title: MSBuild: How to conditionally use one of two targets with same name?
body: <p>I've seen some answers to a similar question but not exactly the same and not with positive luck trying to use suggested solutions... so I'm trying something like this:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;project&gt;
      &lt;target name=&quot;foo&quot; Condition=&quot;'$(Configuration)' == 'Debug' &quot;&gt;
          &lt;Message Text=&quot;=== RUNNING FOO DEBUG TARGET ===&quot; /&gt;
      &lt;/target&gt;
      &lt;target name=&quot;foo&quot; Condition=&quot;'$(Configuration)' == 'Release' &quot;&gt;
          &lt;Message Text=&quot;=== RUNNING FOO RELEASE TARGET ===&quot; /&gt;
      &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>
  <p>... but I'm finding that it doesn't appear to be possible to have two targets with the same name working properly under these conditions. One will negate the other.</p>
  <p>How can I do this?</p>