如何在我的 MSBuild 中访问自定义参数?
例如,这是一个调用:
msbuild.exe /t:CustomTask /p:CustomParameterName="Some Value Here"
我想访问这样的任务:
<Target Name="CustomTask">
<PropertyGroup>
<CustomParameterName>NONE</CustomParameterName>
</PropertyGroup>
<Message Text="Parameter Value: $(CustomParameterName)" Importance="high" />
</task>
...或者无论如何,就像我调用 MSBuild.exe 时通过批处理文件发送的变量一样