Reputation: 1143
How can I access custom parameter in my MSBuild?
For example, this is a call:
msbuild.exe /t:CustomTask /p:CustomParameterName="Some Value Here"
And I want to access in task like this:
<Target Name="CustomTask">
<PropertyGroup>
<CustomParameterName>NONE</CustomParameterName>
</PropertyGroup>
<Message Text="Parameter Value: $(CustomParameterName)" Importance="high" />
</task>
...or anyhow, just like a variable sent trough the batch file while I'm calling MSBuild.exe
Upvotes: 0
Views: 457
Reputation: 1143
Solved the issue:
<PropertyGroup>
<CustomParameterName>NONE</CustomParameterName>
</PropertyGroup>
This need to be defined outside of task.
Upvotes: 0