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 ...

Get Inside the Microsoft® Build Engine: Using MSBuild and Team Foundation Build now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.