Visual 2010 BizTalk project woes

18 November 2010

I sometimes find myself in a situation where I need to make direct modifications to the XML code of an orchestration, map or pipeline. In Visual Studio you can do this easily by opening the file with the non default editor (right click orchestration file, ‘Open With…’ and ‘XML (Text) Editor’).

I encounter very strange behavior for the different file types (orchestrations, maps, pipelines) after I opened them in the Visual Studio 2010 XML editor. For schema files the behavior is as expected. For the other file types it looks like the default editor binding is missing after opening the file in the XML editor.

Orchestrations:

Steps to reproduce:
- right click orchestration (.odx) file in solution explorer
- choose ‘Open With…’
- choose ‘XML (Text) Editor’
- close the orchestration (save is not necessary)
- open the orchestration with the default editor (double click)

Results:
The orchestration opens but displays a very strange screen. It looks like a mix between the orchestration and the code behind:

image

Besides this there are the context menu for the specific orchestration has changed. Two options are added:

image

Maps:

Steps to reproduce:
- right click map (.btm) file in solution explorer
- choose ‘Open With…’
- choose ‘XML (Text) Editor’
- close the map (save is not necessary)
- open the map with the default editor (double click)

Results:
In this case the map opens with the correct mapper editor but there are also two extra options added to the context menu as is the case with orchestrations.

Pipelines:

Steps to reproduce:
- right click pipeline (.btp) file in solution explorer
- choose ‘Open With…’
- choose ‘XML (Text) Editor’
- close the pipeline (save is not necessary)
- open the pipeline with the default editor (double click)

Results:
For pipelines Visual Studio opens the XML representation when double clicking. It seems as if the default editor has changed.

image

This is very annoying. Is it just me? Do you have this too at your development box?

Workaround:
The workarounds I found are:
- Choose ‘Open with…’ and pick the default editor from the list.
- Open the BizTalk project (.btproj) with notepad and remove the ‘<subType>’  xml nodes for every file. After open the project again in Visual Studio it is fixed (until you open the file with the XML editor again).

I’m using BizTalk 2010 RTM (developer edition), Visual Studio 2010 Ultimate. Do you have this too?

I raised this issue on the Microsoft connect site.


BizTalk development on Server 2008 R2

30 September 2009

Microsoft recently RTM-ed a new release of their server operation system ‘Windows Server 2008 R2’. Although debatable I think they did the right thing when they decided to only release a 64 bit version.

From a developer perspective however there is a nasty side effect that you should be aware of. This is caused by the fact that there is no MS virtualization tool running on a client OS that supports 64 bit guests.

Most developers follow the best practice to do development in a virtual environment and use their host for e-mail, word processing, etc.

In my case the host was Windows 7. I used my server running hyper-v to initially build the a new virtual BizTalk 2009 development box running on Windows Server 2008 R2. After that was done I wanted to transfer the .vhd to my laptop and run it from there.

As far as I know the MS options for running the VM are:

  • Microsoft Virtual PC 2007
  • Microsoft Virtual Server 2005 R2
  • Microsoft Windows Virtual PC (currently RC)

As none of these options support 64 bit guest meaning I can’t use a Microsoft Virtualization tool to run my new Windows Server 2008 R2 development environment. Hyper-V supports 64 bit guest OS but doesn’t run on Windows 7.

The “not so nice” solutions left for me were:

  • Use a non MS virtualization tool (like sun virtual box or VMware) that support 64 bit guests.
  • Replace Windows 7 on my host with windows server 2008 hyper-V.
  • Rebuild the virtual machine and use another 32 bit OS.

Missing orchestration template

30 September 2009

Recently I had some trouble when I wanted to create a new orchestration in Visual Studio 2008. The template for the orchestration was gone while the other templates (schemas, maps, etc.) where visible:

no orchestration

I could easily fix this by repairing the BizTalk installation but I must say I do encounter more strange problems with BizTalk 2009 and Visual Studio 2008. It looks like fixes and patches to VS mess up the BizTalk 2009 functionality.

This is probably related to the problem (and solution) described in Matt Milners post. I didn’t try it but I think Matt’s registry solution would have also fixed the issue above.


Call Rules Shape, Atomic Transactions and the Orchestration Designer

13 June 2008
One of the nice improvements in BizTalk 2006 R1 (BTS2k6R1) and higher is that you don’t need to use an atomic transaction scope around the “Call Rules” shape. I guess the reason for this is that classes used internally by the Business Rules Engine are now serializable while they were not in previous release.
 
Recently the orchestration designer in Visual Studio almost got me. I wanted to use a “Call Rules” shape en saw to my surprise that the shape was grayed out in the shape context menu. This is menu you get when you right click somewhere in the orchestration designer surface.
What was going on here? Was I wrong? Was it wishful thinking? Did this new feature only exist in my head? Do I still have to use the atomic transaction scope in my orchestrations? Because Visual Studio is always right and I’m always wrong I was about to add the scope to my orchestration.
 
Because I still felt a little bit disappointed I decided to have a quick look in the BTS2k6r1 help file. Nothing special was mentioned in the topic “How to Use the Call Rules Shape” however. Still curious I also looked at the same topic in the BTS2k6r2 help file. To my surprise the topic is updated and contains the following note:  
 
In BizTalk Server 2004, you can insert a Call Rules shape within an orchestration or a Scope shape with Transaction Type set to Atomic. In BizTalk Server 2006, you do not need to have an atomic scope to insert a Call Rules shape. You can drag a Call Rules shape into the Orchestration Design Surface from the Toolbox. However, in BizTalk Server 2006, the Call Rules menu item is disabled in the context menu if you try to insert a Call Rules shape inside an orchestration that does not have an atomic scope. This is a limitation with the BizTalk Server 2006 product.
 
So I was right! You don’t have to use an atomic transaction scope anymore. Apparently there is a bug in the orchestration designer. You can only drag a call rules shape from the toolbox to the orchestration designer surface. The same option can only be used from the context menu if you are inside a scope.
 
I really wonder what the reason for this is? Is it just a bug? And why didn’t they solve this in BTS2k6r2? And also will it be solved in the coming R3.
 
Anyway what point do I want to make here? 
  • Visual Studio is not always right. In rare cases you’re right and Visual Studio is not! :-)
  • You don’t have to use an atomic transaction scope anymore when you want to use the “Call Rules” shape.

Follow

Get every new post delivered to your Inbox.