Rants, rambles, news and notes from another geek

Generic BizTalk Build System

I was really excited when I first saw Scott Colestock’s NAnt build system for BizTalk 2004&nbsp_place_holder;project (and the update). It was exactly the kind of thing I was looking for on my project.

But I’ve been working with NAnt for quite a while and didn’t really like a few things he’d done. No biggie, everyone has their own style, so I re-wrote it one night.

Conceptually this build script is the same as Scott’s, with two major differences:

  1. It uses a generic build include file driven from a project specific property file
  2. It supports mutiple projects for each project type (i.e. Schema, Map, Orchestration, etc.)

I really like to make my build systems property driven. Ideally, I shouldn’t even have to scroll down a project build file to change its behavior. I think I accomplished that with this build file.

Here is a sample project property file. Assume that we have a solution named Sample.sln and that this file is called Sample.sln.build:

 _place_holder;  _place_holder; _place_holder;  _place_holder;  _place_holder;  _place_holder;  _place_holder;  _place_holder;  _place_holder;  _place_holder;

As you can see, I have pulled all of the dependent information from the main targets file (tools/biztalk.build) and put them in this file. Now when I need to work on a new BizTalk project, I only have to update six lines.

The targets file is way too big to show here (download is below), but the main thing it does differently from Scott’s is to use the task in NAnt to process multiple projects of each type. The only place I was unable to continue this pattern was in the "remove.ports" target, but I think I could do it with a custom NAnt task written in C#. Since that target is only called by "undeploy.pipelines" and since I don't have any pipelines yet, I leave this as an exercise for the reader. (Although I would love it if you sent me the code.)

I hope you all find this as useful and I do. Many props to Scott Colestock for his wonderful trailblazing on this stuff.

The ZIP file GenericBizTalkBuild.zip (11KB) contains the build files and VBS scripts needed for this. Remember, just like with Scott’s system, you must bootstrap your bindings file by doing a traditional deployment and then exporting a binding file!


Now playing: A Perfect Circle - The Package