title: how to write inline code in <Target Name="AfterBuild"> in VisualStudio.csproj
body: <p>if $(ConfigurationName) doesn't work in <code>&lt;AfterBuild&gt;</code></p>
  
  <pre><code>&lt;Target Name="AfterBuild"&gt;
  if $(ConfigurationName) == Release (
      &lt;Exec Command="grunt karma:unit --no-color &amp;gt; grunt-karma-output.txt" IgnoreExitCode="true" /&gt;
      &lt;Exec Command="type grunt-karma-output.txt" CustomErrorRegularExpression=".*mPhantomJS.*FAILED" IgnoreExitCode="false" /&gt;
  )
  &lt;/Target Name="AfterBuild"&gt;
  </code></pre>
  
  <p>if $(ConfigurationName) WORKS in <code>&lt;PostBuildEvent&gt;</code> </p>
  
  <pre><code>&lt;PostBuildEvent&gt;
  if $(ConfigurationName) == Release (
      &lt;Exec Command="grunt karma:unit --no-color &amp;gt; grunt-karma-output.txt" IgnoreExitCode="true" /&gt;
      &lt;Exec Command="type grunt-karma-output.txt" CustomErrorRegularExpression=".*mPhantomJS.*FAILED" IgnoreExitCode="false" /&gt;
  )
  &lt;/PostBuildEvent&gt;
  </code></pre>
  
  <p>Could anyone suggest how to check if the build is in release mode in <code>AfterBuild</code>?</p>