I\'m possibly just blind, but is there a command line to specify conditional compilation symbols in MSBUILD?
I currently have this Line in my buildscript:
I had to use a space instead of a semicolon a la this post by Björn Lasar: http://www.linqinpark.net/2009/01/13/MSBuildWithMultipleDefineConstants.aspx
Update: the blog has disappeared; retrieved via Internet Archive:
Recently I had to use MSBuild directly to automate some builds. I also had to configure some preprocessor defines based upon a configuration. This is usually done by an Argument like this
"/p:DefineConstants=MY_PREPROC_FLAG"
Nothing special here since there are enough comments on the web about that. Today I needed one Flag more and I used the commandline syntax similar to how I knew it from the IDE:
"/p:DefineConstants=MY_PREPROC_FLAG;YET_ANOTHER_FLAG"
but this one didn't work.
So the point is that if you want to support multiple defines to a project by commandline you'll have to separate them by simple spaces...
"/p:DefineConstants=MY_PREPROC_FLAG YET_ANOTHER_FLAG"
and it will be added to the (semicolon-separated) Defines from the IDE. Good to know I think...