# MSBuild doesn't pick Configuration correctly

**URL:** https://www.finalbuilder.com/forums/t/msbuild-doesnt-pick-configuration-correctly/2040
**Category:** Discussion
**Created:** [October 25, 2012, 4:13am UTC](https://www.finalbuilder.com/forums/t/msbuild-doesnt-pick-configuration-correctly/2040 "2012-10-25T04:13:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [October 25, 2012, 4:13am UTC](https://www.finalbuilder.com/forums/t/msbuild-doesnt-pick-configuration-correctly/2040/1 "2012-10-25T04:13:21Z")

</div>

I set my configuration to DEBUG | ANYCPU.&nbsp; I still get release mode builds.

&nbsp;

Error when attaching debugger to process:

> "To debug this module change the project build configuration to debug mode."

I'm running finalbuilder using MSBUILD. The output says:

> Running C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe with parameters : /t:Build /nr:false /logger:FinalBuilderLogger,"C:\Program Files (x86)\  
> FinalBuilder 7\FinalBuilder.MSBuild.Logging.v4.0.dll"   
> /noconlog /p:Configuration="Debug";Platform="AnyCPU"   
> /v:normal /m /p:solutionDir="C:\TFS10\Ecc\TestBranch\" "ProjectName.csproj"

Unless I missed something (wouldn't be the first time), these parameters suggest a Debug build with no optimizations. So why the error?

Note: I have experienced a strange issue when doing my builds in finalbuilder where I have to set an output path in the first property group in msbuild:

```
Debug 
```

```
AnyCPU 
```

```
bin\Debug\/* this has to be here */
```

In this group `` and `` are **not** set. So they are defaults.

If it's set in the next property group, `'Debug|AnyCPU'` property group alone I get a build error regarding output path not found:

```
 bin\Debug\
```

This suggests that the build condition is the default (blank) rather than Debug for some reason.

---

<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: [November 3, 2012, 1:40am UTC](https://www.finalbuilder.com/forums/t/msbuild-doesnt-pick-configuration-correctly/2040/2 "2012-11-03T01:40:34Z")

</div>

Hi Brian   
  
 My apologies for the delay in replying. I’m not sure this is a FinalBuilder issue. If you build the project using MSBuild from the command line do you see the same behavior? I would check the project configuration in Visual Studio and check that the Debug configuration is actually a debug config.
