如果属性值是特定的值,我想要更改它的值。在C#中,我会这样写:
if(x=="NotAllowed")
x="CorrectedValue;
这是我目前为止的代码,请不要嘲笑: <PropertyGroup>
<BranchName>BranchNameNotSet</BranchName>
</PropertyGroup>
///Other targets set BranchName
<Target Name="CheckPropertiesHaveBeenSet">
<Error Condition="$(BranchName)==BranchNameNotSet" Text="Something has gone wrong.. branch name not entered"/>
<When Condition="$(BranchName)==master">
<PropertyGroup>
<BranchName>MasterBranch</BranchName>
</PropertyGroup>
</When>
</Target>