Navigation:  Commands and Procedures >

Continous Integration

Previous pageReturn to chapter overviewNext page

Within Visual Build

 

The ContinuousIntegration.bld sample shows how to implement continuous integration builds (automatic builds whenever source code changes are submitted to source control) with Visual Build.

 

 

Team Foundation Build

 

Visual Build projects can also be called from Team Foundation Build by invoking the Visual Build command-line interface from an MSBuild Exec task.  Add code like this to the end of the TFSBuild.proj file (see this article for more details on modifying and running the Team Build build definition):

 

</ItemGroup>

<Target Name="AfterCompile">

   <Exec Command='"C:\Program Files\VisBuildPro7\VisBuildCmd" /b "$(SolutionRoot)\MyProject.bld"'/>

</Target>

</Project>

 

In addition to the AfterCompile target, several additional targets are available for specifying when Visual Build should be called.  And the BeforeBuild and AfterBuild targets can also be used from regular Visual Studio 2005/2008 projects (outside of Team Foundation Build).

 

 

CruiseControl .NET

 

Continuous integration can also be implemented via CruiseControl .NET by invoking the Visual Build command-line interface from an Executable task.  For example:

 

<exec>

   <executable>C:\Program Files\VisBuildPro7\VisBuildCmd.exe</executable>

   <baseDirectory>D:\dev\MyProject</baseDirectory>

   <buildArgs>/b "D:\dev\MyProject\MyProject.bld"</buildArgs>

   <buildTimeoutSeconds>1000</buildTimeoutSeconds>

</exec>