It seems like if I have a csproj file like the following, I end up with BAR defined and FOO not defined.
<PropertyGroup>
<DefineConstants>FOO</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<DefineConstants>BAR</DefineConstants>
</PropertyGroup>
Is there a syntax for "Define additional constants" so that I can use it and end up with both FOO and BAR defined?
I am aware that in this contrived example, I could just have
<PropertyGroup>
<DefineConstants>FOO BAR</DefineConstants>
</PropertyGroup>
But my actual use case is more complicated. I really need to be able to define a constant in addition to whatever was set before.
This does it:
<PropertyGroup>
<DefineConstants>FOO</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);BAR</DefineConstants>
</PropertyGroup>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With