This is an MSBuild task to invoke multiple targets in parallel. It invokes a new instance of msbuild for each target.
A simple use is:
<CallTargetsParallel Targets="Target1;Target2" GlobalProperties="PropertyName1;PropertyName2" />
Runs Target1 and Target2 in this project file, passing along the current values of the properties PropertyName1 and PropertyName2.
Include the CallTargetsParallel.tasks file somewhere in your project, then in the MSBuild file include the line:
<Import Project="CallTargetsParallel.tasks"/>
<ItemGroup>
<ParallelTargets Include="_global">
<Property1>value1</Property1>
</ParallelTargets>
<ParallelTargets Include="Target1">
<Property2>value2</Property2>
</ParallelTargets>
<ParallelTargets Include="TargetTwo">
<Targets>Target2</Targets>
<Property1>some "value"</Property1>
</ParallelTargets>
<ParallelTargets Include="DualExample">
<Targets>Target1;Target2</Targets>
</ParallelTargets>
<ParallelTargets Include="OtherProject">
<MSBuildFile>myproject.proj</MSBuildFile>
<Targets>Build</Targets>
<Property3>$(Property3)</Property3>
</ParallelTargets>
</ItemGroup>
<CallTargetsParallel Targets="@(ParallelTargets)" GlobalProperties="Property5" />
This will invoke 4 msbuild instances in parallel:
It's quite similar to the MSBuildExtensionPack Parallel task (http://www.msbuildextensionpack.com/help/4.0.8.0/html/23e4198a-c266-e8a3-4aea-7cf131a0837c.htm) but differs in the way it is invoked, making it significantly easier to pass existing properties without worrying about escaping values for command-line execution. I wrote this because I was trying to use parallel tasks in a complex project, and MSBuildExtensionPack's implementation meant I had giant easy-to-mess-up blocks of parameters to be passed to each invocation, and it quickly became unreadable.