MSBuild Log entry and Compiler Constants AKA. MSBuild Parameters

G'day,

I've got some logic in my application that looks at 32bit and 64bit registry entries. The code required a compiler constant to implement the correct code, depending on the .net Framework edition. I don't think the parameters specified in the Continua MSBuild Action are getting passed to the command line that's executing because the Command Line constant is not passing my unit tests. It I set the value in the VS Project file, it compiles and executes unit tests correctly.  I thought it might just be the Continua Log displaying incomplete text, but I explicitly checked a manual command line build to confirm the behaviour. Is this a bug or have a made another PEBCAK?

MS Build Action - Settings

MSBuild properties are not the same as compiler constants. You need to set the DefineConstants property :

DefineConstants=“SOMETHING=1;SOMETHINGELSE=2”


Thanks Vincent, knew I was missing something. I must admit to having difficultly getting this variable structure to the Continua UI.
Eventually I added the following to the “Extra Cmd Params” field after a bit of searching around the web and a lot of trial and error.

/p Amazing how many hoops you have to jump through within the .net framework.

You don’t need to use the Extra Cmd parameters, the Properties tab on the MSBuild action does exactly that.

I agree the properties tab should do it, but I had troubles getting the formatting to work. I tried about a dozen times, but the code that does the parsing of that information kept dropping everything after the second equals, so I couldn’t get it to function in this case.

Hi Jamie

This hotfix build fixes the properties parsing, so you should not need to use the Extr Cmd parameters option in the future :

http://downloads.finalbuilder.com/downloads/continua/1.0/ContinuaCI.Server.Setup_x64_1.0.0.2402.exe
http://downloads.finalbuilder.com/downloads/continua/1.0/ContinuaCI.Server.Setup_1.0.0.2402.exe
http://downloads.finalbuilder.com/downloads/continua/1.0/ContinuaCI.Agent.Setup_x64_1.0.0.2402.exe
http://downloads.finalbuilder.com/downloads/continua/1.0/ContinuaCI.Agent.Setup_1.0.0.2402.exe

Wow, thanks guys.