O'Reilly logo

Inside the Microsoft® Build Engine: Using MSBuild and Team Foundation Build by William Bartholomew, Sayed Ibrahim Hashimi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Batching to Build Multiple Configurations

There are many situations when you might need to build a set of projects for a set of defined configuration values. We’ll examine how to do this now. The basic idea here is that you’ll use the MSBuild task in order to build each project while passing in the Configuration property value. All the values for the configuration should be placed in an item so they can be expanded using batching. The contents of the Batching06.proj file are shown in the next snippet.

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> <PropertyGroup> <SourceRoot>TestProjects\</SourceRoot> <OutputRoot>..\BUILD\BuildTemp\</OutputRoot> </PropertyGroup> <ItemGroup> <AllConfigurations Include="Debug ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required