title: How to override a configuration property?
body: <p>I am trying to do both Release and Debug builds on .Net v4.0, where I have a MSBuild project file rather than a solution file. I want to use the same build project file, but just override the Configuration property switching between "Debug" and "Release". </p>
  
  <p>When I execute as follows</p>
  
  <blockquote>
  <pre><code>c:\windows\microsoft.net\framework\v4.0.30319\msbuild.exe buildinv.proj
  /target:rebuild "/property:Configuration=Debug" /verbosity:Diagnostic
  </code></pre>
  </blockquote>
  
  <p>I get the following error</p>
  
  <blockquote>
  <pre><code>c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(483,9):
  error : The OutputPath property is not set for project
  'buildinv.proj'.  Please check to make sure that you have specified a
  valid combination of Configuration and Platform for this project. 
  Configuration='Debug'  Platform=''.
  </code></pre>
  </blockquote>
  
  <p>I can see that that the error is occurring in <code>_CheckForInvalidConfigurationAndPlatform</code>.</p>
  
  <p>If I pass an OutputPath property it will however work</p>
  
  <blockquote>
  <pre><code>c:\windows\microsoft.net\framework\v4.0.30319\msbuild.exe buildinv.proj
  /target:rebuild "/property:Configuration=Debug" "/property:OutputPath=."
  </code></pre>
  </blockquote>
  
  <p>Is this a known bug ? Where I need to override the Configuration property I am going to get forced to override the OutputPath property even though i do not wish to.</p>
  
  <p>Thanks in advance.</p>