Here is an example of a way to run msbuild targets in parallel. The idea is same ... presenting this msbuild file itself as a project to build. I copied it from my own question: Evaluate item defined in msbuild task via C#
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0" DefaultTargets="Build">
<Target Name="Build" DependsOnTargets="PrepareEnvironmentForBuild;MapDrives">
<Exec Command="$(MSBuildBinPath)\msbuild /nologo /clp:Verbosity=quiet $(MSBuildThisFileFullPath) /t:TargetWithConfidentialSteps"/>
<ItemGroup>
<StepsToRunInParallel Include="$(MSBuildThisFileFullPath)">
<Properties>TargetToInvoke=ParallelTarget1</Properties>
</StepsToRunInParallel>
<StepsToRunInParallel Include="$(MSBuildThisFileFullPath)">
<Properties>TargetToInvoke=ParallelTarget2</Properties>
</StepsToRunInParallel>
</ItemGroup>
<MSBuild Projects="@(StepsToRunInParallel)" BuildInParallel="true" StopOnFirstFailure="true" Targets="InvokeInParallelWithinThisProject"/>
</Target>
<Target Name="InvokeInParallelWithinThisProject">
<MSBuild Projects="$(MSBuildThisFileFullPath)" Targets="$(TargetToInvoke)" StopOnFirstFailure="true"/>
</Target>
<Target Name="ParallelTarget1">
<Message Text="Hello from ParallelTarget1"/>
</Target>
<Target Name="ParallelTarget2">
<Message Text="Hello from ParallelTarget2"/>
</Target>
<Target Name="PrepareEnvironmentForBuild">
<Message Text="Hello from PrepareEnvironmentForBuild"/>
</Target>
<Target Name="MapDrives">
<Message Text="Hello from MapDrives"/>
</Target>
<Target Name="TargetWithConfidentialSteps">
<Message Text="Hush! Verbosity on the wrapper does not affect the Exec call." Importance="High"/>
</Target>