Hello all!
I'm trying to set a constant in an MSBuild file depending on a Bamboo variable, but for some reason MSBuild is not picking it up.
My MSBuild file looks like this:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="BuildBinaries">
<Target Name="BuildBinaries">
<MSBuild Projects="..\MySolution.sln" Targets="Build" Properties="Configuration=Release;DebugType=None;Constants=" BuildInParallel="true" Condition="'$(bamboo_ProduceReleasableBuild)' == 'False'"/>
<MSBuild Projects="..\MySolution.sln" Targets="Build" Properties="Configuration=Release;DebugType=None;Constants=PRODUCE_RELEASABLE_BUILD" BuildInParallel="true" Condition="'$(bamboo_ProduceReleasableBuild)' != 'False'"/>
</Target>
</ProjectI also have a plan variable named ProduceReleasableBuild.
The problem I'm having is that MSBuild always runs the task with condition bamboo_ProduceReleasableBuild == 'False', never the !false one. When I check with a powershell script I can see that Bamboo is setting the bamboo_ProduceReleasableBuild env variable correctly, also when I override it for a custom build.
I tried this on my local machine with an environment variable bamboo_ProduceReleasableBuild set and this behaves correctly for both the False and !False cases.
Any idea what the issue could be?
The Bamboo version is 5.8.1.
Regards
Stan