In BizTalk 2006 R2 and earlier, the only way to build a BizTalk solution via command-line (i.e. Team Build) is to run Visual Studio itself using devenv.exe and pass it the BizTalk solution file path.
To build a Deployment Framework for BizTalk MSI from Team Build 2005 or 2008:
1. Open or create a TFSBuild.proj Team Build build definition file
Please refer to the Team Build 2005 or 2008 documentation for instructions on creating a build type.
2. Set the CustomizableOutDir property to True (Team Build 2008)
By default, Team Build redirects the build outputs of all projects to a single binaries folder. This causes a problem for the Deployment Framework's MSI build process, which expects the build outputs to remain within the solution folder structure as in a normal Visual Studio build.
Starting with Team Build 2008, this behavior can be stopped by setting the property CustomizableOutDir to True:
<PropertyGroup>
...
<CustomizableOutDir>true</CustomizableOutDir>
...
</PropertyGroup>
3. Remove and replace the default solution build step(s)
Replace the default solution build process with your own implementation. The following excerpt demonstrates a custom process to build the solution using devenv.exe, build the BTDF MSI and then copy it to the drop folder.
Note: The full TFSBuild.proj may be found in the Samples\TeamBuild folder under the Deployment Framework for BizTalk installation folder.
<Target Name="AfterCompile">
<!--Call DevEnv to build the BizTalk Solution-->
<Message Text="Building BizTalk solution using DevEnv"/>
<Exec
Command=""c:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv" "$(SolutionPath)" /Build "$(BuildFlavor)""/>
<CallTarget Targets="BuildMSI" Condition="'$(DeploymentFramework)' == 'true'" />
</Target>
<Target Name="BuildMSI">
<!--Call batch file to build the MSI (if using Deployment Framework) -->
<Message Text ="Building MSI using $(DeploymentProjectDir)\BuildReleaseMsi.bat"/>
<Exec Command="BuildReleaseMsi.bat" WorkingDirectory="$(DeploymentProjectDir)"/>
<!-- Get the MSI to the appropriate drop location. -->
<MakeDir Directories="$(DropLocation)\$(BuildNumber)\$(BuildFlavor)" Condition="!Exists('$(BinariesRoot)\$(BuildFlavor)')" />
<Message Text="Copying msi from $(DeploymentProjectDir)"/>
<Copy SourceFiles="$(DeploymentProjectDir)\bin\$(BuildFlavor)\BizTalkSample.msi"
DestinationFiles="$(DropLocation)\$(BuildNumber)\$(BuildFlavor)\BizTalkSample.$(BuildNumber).msi"/>
</Target>
Created with the Personal Edition of HelpNDoc: iPhone web sites made easy