Monday, October 08, 2007

C# Generated code from Biztalk Orchestrations

Sometimes you get some odd error messages on your Orchestrations. And it gives you the line number where the error is occurring. To get to the source code generated from the XLang when it is creating the C# code, you can use this is old trick from the 2004 days.

It is still valid in Vista x64 and Biztalk 2006. :D

Open your registry and look for the following hive:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0
now create a key named BiztalkProject

under this key, add a DWORD named GenerateCSFiles. Set the value to 1.




Now, close all instances of Visual Studio. Open a new instance of Visual Studio and create a Biztalk project


Build it. After it built, click on Show All Files:


Bingo, you will see the C# code:

8 comments:

danshultz said...

Handy tip, thanks.

Arnulfo Wing said...

you're welcome.

Paul said...

Although it generated a MyOrchestration.cs file, the file is blank. The error that I am attempting to fix is "Bad array bound: must be an unsigned integer." The error points to the orchestration. Ideas?

Arnulfo Wing said...

Paul. It is hard to tell, where your error is coming from. If you want, I can take a look at your code, zip it and send it to my gmail address.
Thanks.

Renzo said...

I don't Have the key BiztalkProject in the Registry. I'm working on a project containing 8 orchestrations. All .cs files are empty but one that contains all generated code from all the 8 orchestrations. Is it normal?

Arnulfo Wing said...

Hi Renzo. Yes, I have noticed the same thing on my projects. The main orchestration CS file will have ALL of the code.

Even though it makes individual CS files for each orchestration.

If you search for any of the logical ports of your other orchestrations inside this main file, you will see the code there. weird behavior...

RRave said...
This comment has been removed by a blog administrator.
gfh said...
This comment has been removed by a blog administrator.