title: How do I conditionally enable attributes in C#? "#if DEBUG" isn't working
body: <p>The trusty old preprocessor directive in C# appear to work great when I write:</p>
  
  <pre><code>#if DEBUG
  ...
  (Some code)
  ...
  #endif
  </code></pre>
  
  <p>However, attributes enclosed in the conditional block appear to continue to get processed and I get errors indicating such. For instance, surrounding an <code>[AssemblyVersion(...)]</code> within the conditional block appears to have no affect.</p>
  
  <p>I can go into the details as to why we want to conditionally ignore the [AssemblyVersion(..)], but it's irrelevant. Any ideas?</p>