Automating Compilation of Visual Studio 2005 BizTalk projects

Hi Folks,

When I prepare to deploy my BizTalk assemblies and related projects, I usually choose MSBuild for the task. However, MSBuild and BizTalk projects are not compatible, and warnings will be issued if you do try to build them.

In such cases, what I do is use a different compilation tool and just include it in my main MSBuild script. I have written about MSBuild in my other blogs on this site, if you interested to take a look at how it works in more detail.


Below is sample on how I incorporate my BizTalk projects into my build scripts:

@echo off
"C:\Program Files\Microsoft Visual Studio 8\Common7\Ide\devenv" MMIT.FileManagement.sln /build "Release" /project MMIT.FileManagement.Orchestrations\MMIT.FileManagement.Orchestrations.btproj /projectconfig "Deployment"

As you can see I use the devenv command to build my BizTalk bases solutions. Then I call MSBuild to prepare my deployment scripts, below is the sample build script referenced here as


<Project  xmlns="" >

    <!– Set the application name as a property –>

    <Target Name="MakeBuildDirectory">
        <MSBuild Projects="MMIT.FileManagement.sln" Targets="Rebuild" ></MSBuild>
        <CreateItem Include="$(SourceDir1)\bin\*.dll">
            <Output TaskParameter="Include" ItemName="WebBinFiles"/>
        <CreateItem Include="$(SourceDir2)\bin\Release\*.dll">
            <Output TaskParameter="Include" ItemName="GACBinFilesWS"/>
        <CreateItem Include="$(SourceDir3)\bin\Release\*.dll">
            <Output TaskParameter="Include" ItemName="GACBinFilesWS"/>
        <CreateItem Include="$(SourceDir4)\bin\Release\*.dll">
            <Output TaskParameter="Include" ItemName="GACBinFilesWS"/>
        <CreateItem Include="$(SourceDir5)\bin\Release\*.dll">
            <Output TaskParameter="Include" ItemName="GACBinFilesWS"/>
        <CreateItem Include="$(SourceDir6)\bin\Deployment\MMIT.*.dll">
            <Output TaskParameter="Include" ItemName="GACBinFilesBizTalk"/>
        <CreateItem Include="$(SourceDir6)\bin\Deployment\MMIT.Common.dll">
            <Output TaskParameter="Include" ItemName="GACBinFilesCommon"/>
        <CreateItem Include="$(SourceDir1)\*.asmx;$(SourceDir1)\*.config;$(SourceDir1)\*.asax">
            <Output TaskParameter="Include" ItemName="WebServiceFiles"/>
        <Copy SourceFiles="@(WebServiceFiles)" DestinationFolder="$(BuildDirWeb)"/>
        <Copy SourceFiles="@(WebBinFiles)" DestinationFolder="$(BuildDirWeb)\bin"/>
        <Copy SourceFiles="@(GACBinFilesWS)" DestinationFolder="$(BuildDirGACWS)"/>
        <Copy SourceFiles="@(GACBinFilesBizTalk)" DestinationFolder="$(BuildDirGACBizTalk)"/>
        <Copy SourceFiles="@(GACBinFilesCommon)" DestinationFolder="$(BuildDirGACWS)"/>

The script above will prepare deployment folders based on server types for me, due to distributed components, and my output is as follows:

Below MSBULD, groups my assemblies into those for the GAC, and also those for web services only.



Also, those that need to be put in the GAC, are again grouped by server roles, in the event your production environment has dedicated hardware for web services, BizTalk servers, and web sites.


  • Uncategorized

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s