Task Batching

As stated previously, task batching is the process of invoking the same individual task multiple times, each time with a subset of the original input items, where the input is defined by the batches created for the task. See the following example, which is contained in the Batching02.proj file.

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <SourceFolder>src\</SourceFolder> </PropertyGroup> <ItemGroup> <SourceFiles Include="$(SourceFolder)one.txt"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </SourceFiles> <SourceFiles Include="$(SourceFolder)two.txt"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </SourceFiles> <SourceFiles Include="$(SourceFolder)three.txt"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> ...

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.