# MSBuild Log entry and Compiler Constants AKA. MSBuild Parameters

**URL:** https://www.finalbuilder.com/forums/t/msbuild-log-entry-and-compiler-constants-aka-msbuild-parameters/5030
**Category:** Discussion
**Created:** [August 5, 2013, 10:15am UTC](https://www.finalbuilder.com/forums/t/msbuild-log-entry-and-compiler-constants-aka-msbuild-parameters/5030 "2013-08-05T10:15:07Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Jenasys](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/jenasys/32/888_2.png) [@Jenasys](https://www.finalbuilder.com/forums/u/Jenasys)
#### Post date: [August 5, 2013, 10:15am UTC](https://www.finalbuilder.com/forums/t/msbuild-log-entry-and-compiler-constants-aka-msbuild-parameters/5030/1 "2013-08-05T10:15:07Z")

</div>

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.&nbsp; 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

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [August 5, 2013, 10:23am UTC](https://www.finalbuilder.com/forums/t/msbuild-log-entry-and-compiler-constants-aka-msbuild-parameters/5030/2 "2013-08-05T10:23:30Z")

</div>

MSBuild properties are not the same as compiler constants. You need to set the DefineConstants property :   
  
 DefineConstants=“SOMETHING=1;SOMETHINGELSE=2”

---

<div class="post-metadata">

### Author: ![Jenasys](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/jenasys/32/888_2.png) [@Jenasys](https://www.finalbuilder.com/forums/u/Jenasys)
#### Post date: [August 5, 2013, 12:23pm UTC](https://www.finalbuilder.com/forums/t/msbuild-log-entry-and-compiler-constants-aka-msbuild-parameters/5030/3 "2013-08-05T12:23:21Z")

</div>

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.**

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [August 5, 2013, 3:11am UTC](https://www.finalbuilder.com/forums/t/msbuild-log-entry-and-compiler-constants-aka-msbuild-parameters/5030/4 "2013-08-05T03:11:06Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Jenasys](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/jenasys/32/888_2.png) [@Jenasys](https://www.finalbuilder.com/forums/u/Jenasys)
#### Post date: [August 5, 2013, 11:23am UTC](https://www.finalbuilder.com/forums/t/msbuild-log-entry-and-compiler-constants-aka-msbuild-parameters/5030/5 "2013-08-05T11:23:34Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [August 9, 2013, 10:42am UTC](https://www.finalbuilder.com/forums/t/msbuild-log-entry-and-compiler-constants-aka-msbuild-parameters/5030/6 "2013-08-09T10:42:57Z")

</div>

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_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.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_x64_1.0.0.2402.exe)   
 [http://downloads.finalbuilder.com/downloads/continua/1.0/ContinuaCI.Agent.Setup\_1.0.0.2402.exe](http://downloads.finalbuilder.com/downloads/continua/1.0/ContinuaCI.Agent.Setup_1.0.0.2402.exe)

---

<div class="post-metadata">

### Author: ![Jenasys](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/jenasys/32/888_2.png) [@Jenasys](https://www.finalbuilder.com/forums/u/Jenasys)
#### Post date: [August 9, 2013, 1:05am UTC](https://www.finalbuilder.com/forums/t/msbuild-log-entry-and-compiler-constants-aka-msbuild-parameters/5030/7 "2013-08-09T01:05:09Z")

</div>

Wow, thanks guys.
