If you’re like me (lazy), chances are that you’ve tried to take shortcuts when refactoring BizTalk projects and run into the same trouble that I have.

What I’ve found is that if you open a BizTalk orchestration file in the Visual Studio XML viewer and made any changes to it (typical changes I would make here would be to cater for changes to names or namespaces), then the next time you try to open that file, it will only do so in a text viewer (you’ll see output like the below, this isn’t quite the same as an XML view, it certainly isn’t very helpful).

You can of course right click on the file and choose open with designer but this is an inconvience.

To fix this permanently, you will need to edit the .csproj project file (you can do this in visual studio by right clicking on the project, choosing unload, and then edit, or alternatively you can just open the file in notepad or some other text viewer).  Search for any XML elements named subtype and delete them.  This should fix your problem permanently.

I’m semi-convinced that I’ve had this problem with map files in the past as well.  While trying to reproduce this for the blog I’ve found that when I edited a map manually the subtype element did get added to the .csproj file but the map continued opening in the designer, weird.  Anyways, just remember as a rule that the subtype element is bad and you will want to get rid of it.