title: How to arrange post build event action per PreprocessorDefinitions, which may contain or not contain a compilation preprocessor
body: <p>In Visual Studio, I want to arrange the post build event activities according to a preprocessor defined in the $(PreprocessorDefinitions). The problem is there might be many preprocessors defined, so I have to detect whether $(PreprocessorDefinitions) contains a particular preprocessors, but not sure about the grammar for post event action in VS.</p>
  <p>Likely it would be:</p>
  <pre><code>TARGET_PATH=&quot;....&quot;
  if $(PreprocessorDefinitions) &quot;contains&quot; &quot;DEFINED_AS_SUCH&quot; 
      TARGET_PATH=&quot;otherwise&quot;
  
  cp $(THIS_FILE) $(TARGET_PATH)
  </code></pre>
  <p>And the PreprocessorDefinitions could be:</p>
  <pre><code>&lt;PreprocessorDefinitions&gt;DEFINED_AS_SUCH;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)&lt;/PreprocessorDefinitions&gt;
  </code></pre>