NuGet がそうしているように、こうすると任意の .targets ファイルをインポートさせることができる。 旧形式と SDK style の両対応するには CustomAfterMicrosoftCommonCrossTargetingTargets CustomAfterMicrosoftCommonTargets の両方のプロパティを設定する必要がある。
msbuild c:\home\github\ProcessPipeline\src\ProcessPipeline\ProcessPipeline.csproj ^
/p:CustomAfterMicrosoftCommonCrossTargetingTargets="C:\home\playground\DumpCompileItems.targets" ^
/p:CustomAfterMicrosoftCommonTargets="C:\home\playground\DumpCompileItems.targets" ^
/p:TargetFramework=net461 /t:DumpCompileItems