title: MSBuild.exe not accepting either /p:DefineConstants nor /p:PreprocessorDefinitions
body: <p>I've been through quite a number of articles on Stack Overflow that answered the question "How do I pass preprocessor definitions to the compiler from the MSBuild command line," and they all responded with some variation of:</p>
  
  <pre><code>MSBuild.exe /p:DefineConstants=THING_TO_BE_DEFINED
  </code></pre>
  
  <p>I have tried every variation that I could come up with:</p>
  
  <pre><code>MSBuild.exe "/p:DefineConstants=THING_TO_BE_DEFINED"
  MSBuild.exe /p:DefineConstants="THING_TO_BE_DEFINED"
  MSBuild.exe "/p:DefineConstants=THING_TO_BE_DEFINED=1"
  MSBuild.exe /p:DefineConstants="THING_TO_BE_DEFINED=1"
  </code></pre>
  
  <p>...and dozens of others.  I've also flirted with overriding PreprocessorDefinitions in similar ways.  All of them triggered the #error below:</p>
  
  <pre><code>#include "stdafx.h"
  
  #if !defined(THING_TO_BE_DEFINED)
  #error "THING_TO_BE_DEFINED is not defined"
  #endif
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      return 0;
  }
  </code></pre>
  
  <p>I've been trying this with the simple command-line application above, as well as with a huge game project that I have here.  I can only guess that Visual Studio (I'm seeing this with 2005 and 2008) has some default set deep in its bowels that is preventing my command line argument from being applied, but I've found no evidence to support this hypothesis.</p>
  
  <p>Any ideas on how I can get this to work?  Why in the name of FSM didn't they stick with good ol' -D THING_TO_BE_DEFINED?</p>