vrijdag 29 oktober 2010

Migrating BizTalk 2006R2 sources to BizTalk 2010 without (too much) pain

I ran into it. You probably did too. You tried to convert your BizTalk 2006R2 solution to BizTalk 2010 (or 2009) and found that your solution was OK, your C# libraries went just fine, but none of your BizTalk projects had been converted.

Then, when you retried this from the converted solution, or tried to load a .btproj directly, you got that dreaded message: Error converting project file. The element <BIZTALK> beneath element <VisualStudioProject> is unrecognized.

I 'blame' the BizTalk Deployment framework for this as Microsoft clearly thought noone would ever try to move away from the suggested Deployment and Development build configurations. So if you, as we did, change it to Debug and Release when we moved to the BTDF, you are in for a bit of work.

Now I have for you the best way to get going. I found it just out of sheer desperation trying to get things working the way they should.

The best part? It takes just about 5 minutes per solution, independent of the size of it!!. It has worked for all solutions I have tried so far.

Now, How to do it.(NOTE: This walkthrough demonstrates the principle. There are several optimizations possible, especially when executing text search and replace actions on files)

1) Make sure you have a backup of your solution file BEFORE trying any conversions. You need the clean 2006R2 version. (or : you can of course also use an Undo Pending Changes option of you TFS). Also, as pointed out by other users of this method, delete any .user files within the solution you want to convert.

2)Just open the solution in Visual Studio 2010 as you want to. This will prompt the upgrade wizard to do what it does best.

3)Review the loaded solution. You should have a converted solution, loaded C# libraries and unloaded BizTalk projects.

4) Close all windows in Visual Studio.

5) Right-click each unloaded project file and select Edit to open it in text mode. You now should have all files open in text mode.

6) Using basic search and replace do a replace on all open documents replacing Name = "Debug" by Name = "Development" and replacing Name = "Release" with Name = "Deployment". Each replace should give a count of items replaced equal to the number op open BizTalk projects.

7) Now the big trick: Either close your solution and put back the backed up .sln file you made earlier and then re-open your solution OR just select Undo Pending changes on your solution file (AND JUST THE SOLUTION FILE...)

8) The Migration Wizard will trigger again and now will convert your BizTalk projects as expected.

9) Now we are almost done, except that you BizTalk project has a configuration base (Deployment/Development) that has not been defined in the solution (Release/Debug).

You need to get this back in sync. To do this, unload all BizTalk projects from the solution (right-click, select unload) and once again open them in textmode (all other windows closed)

10) Now reverse the replace: replace "Development" with "Debug" and replace "Deployment" with "Release". Save all files, then close all files.

11) Close and reopen you solution, as for some reason, Visual Studio complains about reloading projects that are already opened under the solution if you try to reload them now. Even when they are closed...

12) Reload all BizTalk projects in the solution, save and we are done.

So. I hope this just will get you going. Any comments, as always, are appreciated to make this work better, make note of exceptions to the rule etc etc.



As an add-on: Of course it is also possible to migrate an entire collection of solutions under TFS this way. You still need to open each and every solution in between the two find/replace actions. You can use VS's find/replace in Files option when viewing your source-control page to process all .btproj files from a given location down.

17 opmerkingen:

  1. Hi,
    I have a btproj which is neither openingin vs2005 and vs 2009, all the time dreaded converter shows up and doesnt go beyound the error mentioned on top of the page, I can't add this project to a solution even as it just doesn't loads up.

    BeantwoordenVerwijderen
  2. Deze reactie is verwijderd door de auteur.

    BeantwoordenVerwijderen
  3. It sounds like you already converted the solution once. To follow the steps here, you need the original Visual Studio 2005 solution.

    If you do not have this, try to recreate the situation by creating a new solution in Visual Studio 2005, then adding the unwilling project.

    You need to have BizTalk 2006R2 installed when creating the solution :) Not BizTalk 2009 or 2010...

    This way you should be able to convert using the steps mentioned.

    Just remember to backup your solution file.

    Just for to state a fact: it seems you cannot convert BizTalk projects. Just solutions containing BizTalk projects.

    BeantwoordenVerwijderen
  4. Please add that you also need to delete all *.user files for this to work

    BeantwoordenVerwijderen
  5. Thanks for the feedback. I did not run into this specific scenario as our .user files are not under source control and we migrated using clean machines. Have added it to the description.

    BeantwoordenVerwijderen
  6. http://just2thepoint.blogspot.fr/2014/07/migrating-biztalk-2006-r2-sources-to.html

    BeantwoordenVerwijderen
  7. This is an amazing blog, and it helps students.Thanks for haring
    Biztalk
    Online Training Bangalore

    BeantwoordenVerwijderen
  8. Whatever we gathered information from the blogs, we should implement that in practically then only we can understand that exact thing clearly biztalk training , but it’s no need to do it, because you have explained the concepts very well. It was crystal clear, keep sharing..

    BeantwoordenVerwijderen
  9. There are many people who want to love sex with different partners and they imagine almost time for a new partner. These types of desires and thoughts can vary in different mind and the imagination about being with some new partner and making some sexual and erotic activities with her.
    Escort Lebanon
    Escorts Lebanon
    Escort in Lebanon
    Escorts in Lebanon
    Lebanon Escort
    Lebanon Escorts

    BeantwoordenVerwijderen
  10. I just finished reading your article, and I must say, it was fantastic! You made complex concepts seem so simple and approachable. I'm curious to know if you've come across any unique coins on Radhe exchange ?latelyRadhe exchange membership registration

    BeantwoordenVerwijderen