title: C# How to check the solution configuration
body: <p>For my project I don't use the standard <em>Debug</em> and <em>Release</em> solution configurations, instead I have custom configurations e.g. ReleaseConfig1.</p>
  
  <p>In C# is there anyway I can check what release configuration the project was built against.</p>
  
  <p>I tried the below but it always goes to the else:</p>
  
  <pre><code>#if ReleaseConfig1
  //blah
  #else
  //blah blah
  #endif
  </code></pre>
  
  <p>My solution configuration looks something like this:</p>
  
  <pre><code>ReleaseConfig1:
  Project 1: Release
  Project 2: ReleaseSpecialXXX
  Project 3: Debug
  
  ReleaseConfig2:
  Project 1: ReleaseSpecialZZZ
  Project 2: Release
  Project 3: Debug
  </code></pre>