I am trying to set the default value for the MSBuild property. Let's say I start with this:
<Choose>
<When Condition="..something..">
<PropertyGroup>
...
<MySetting>true</MySetting>
<PropertyGroup>
</When>
...
</Choose>
If the condition is not true, then the value will be indicated on MySetting. '' So this should not be false?
<PropertyGroup>
<MySetting Condition="'$(MySetting)'==''">false</MySetting>
</PropertyGroup>
Later, I would like to use MySetting in a conditional expression without checking for == 'true', for example:
<PropertyGroup Condition="$(MySetting)">
...
</PropertyGroup>
But when I load this project in Visual Studio, it complains that the specified condition "$ (MySetting)" is evaluated as "" instead of a boolean.
Thus, it seems that either my condition, which checks `` to set the false property, is incorrect. What am I doing wrong?
scobi source
share