Geeks With Blogs

News
Charles Young

Some time ago I published a utility on GotDotNet.com which dumps the temporary C# source code files generated by BizTalk during compilation. The utility works quite well, but cannot always dump all the files because it is unable to prevent BizTalk from deleting files once compilation is complete. BizTalk sometimes gets there first, removing the temporary files before the utility has a chance to copy them to the target dump location. Another problem is that the files have meaningless names, and are therefore difficult to trace back to the corresponding BizTalk artefacts.

The utility is cool…but quite unnecessary. It turns out that Microsoft has implemented an undocumented registry setting to control the generation of C# files. Create a key called BizTalkProject at the following location:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1

Next, create a DWORD value called GenerateCSFiles. Set the value to 1 (or higher). Restart Visual Studio, load a BizTalk project and re-compile. Now take a look at your project folder. Some of you may be disappointed to know that GenerateVBFiles and GenerateJSFiles are not supported.

Enjoy!

Posted on Saturday, January 22, 2005 12:01 AM BizTalk Server 2004/2006 | Back to top


Comments on this post: BizTalk Server 2004: Generating C# source files

# re: BizTalk Server 2004: Generating C# source files
Requesting Gravatar...
I did, but I can't find the .cs files, where are they are generated,
Left by tareq muhammad on Jan 27, 2005 12:17 AM

# re: BizTalk Server 2004: Generating C# source files
Requesting Gravatar...
They should be in your BizTalk project folder. They are not included as part of the BizTalk project, so you will either need to browse to the folder using Explorer, or use the "Show All FIles" button in Visual Studio's Solution Explorer.
Left by Charles Young on Jan 27, 2005 9:02 AM

# re: BizTalk Server 2004: Generating C# source files
Requesting Gravatar...
it works thanks
Left by Tareq Muhammad on Jan 29, 2005 11:50 AM

# re: BizTalk Server 2004: Generating C# source files
Requesting Gravatar...
Great tip. Thanks.

You're right, by the way, about some of use being disappointed about the lack of a GenerateVBFiles option.
Left by David Stampfli on Feb 05, 2005 6:13 PM

# re: BizTalk Server 2004: Generating C# source files
Requesting Gravatar...
Great tip !!
Could get the code successfully.
However it generates blank files for some orchestrations.

Any ideas ?
Left by Sanket Bakshi on May 26, 2005 11:17 AM

# re: BizTalk Server 2004: Generating C# source files
Requesting Gravatar...
It's a 'feature'. The code generator, for reasons best known to itself, often decides to pack the code for multiple orchestrations into a single file, but continues to create files for every orchestration! Hence, you get orchestration files that are empty. All the code is there, but you have to go looking for it.
Left by Charles Young on May 26, 2005 3:11 PM

# BizTalk 2004 Debugging Tip
Requesting Gravatar...
Symbolic Debugging for Orchestrations...
http://www.traceofthought.net/PermaLink,guid,75e22eec-348d-4880-bea4-6c7a5316e2dd.aspx...
Left by CedarLogic on Jun 06, 2005 4:22 PM

# re: BizTalk Server 2004: Generating C# source files
Requesting Gravatar...
Works for BizTalk 2006 Beta 1 too... just remember to change that VS version.
Left by AndyM on Oct 18, 2005 9:32 PM

# BizTalk Server 2004 not able to load project
Requesting Gravatar...
there is error that not able to load project and btproj component is missing plz help me urgently
Left by Arun Shrivastava on Nov 18, 2005 3:41 AM

# re: BizTalk Server 2004: Generating C# source files
Requesting Gravatar...
This is not working. No code generated. I am using it in terminal server environment.
Left by haja on Jan 08, 2007 10:35 AM

Your comment:
 (will show your gravatar)


Copyright © Charles Young | Powered by: GeeksWithBlogs.net