I assume you can edit the .proj file. You can manage MSBuild targets with Condition . Your goal you want to exclude may contain the following:
<Target Name="SomeTarget" Condition="'$(SomeProperty)'=='true'" DependsOnTargets="SomeAnotherTarget"/>
SomeProperty can be passed in a call:
MSBuild.exe build.proj /p:SomeProperty=false
Hi
source share