In TeamCity I created a Build Configuration with two msbuild Build Steps which should build a Solution .sln file.
I defined the target as "Build", when I run the build, both steps obviously execute the standard configuration and both build either Debug or Release configuration twice.
Now I went to the build step settings and found the CommandLine
argument, for Debug
I added /p:Configuration=Debug
, for Release
I added /p:Configuration=Release
.
Building this results in a warning of TeamCity:
MSBuild command line parameters contain "/property:" or "/p:". It is recommended to define System Property on Build Parameters instead.
Although one debug and one release has been build.
I googled this message and created two System Parameters
: /p:Configuration=Debug
and /p:Configuration=Release
.
If I would now change my command line for debug to %system.DebugConfig%
and for release to %system.ReleaseConfig%
I get the same error.
Only then I really understood that those system parameters will be passed to each build step never automatically, always.
Ok, but how do I properly define two different build steps building debug and release using system parameters or without team city complaining about /p
found in command line?