title: Strange transform behaviour for web.config when publishing a webapp
body: <p>I have created a new mvc webapp with the following transforms for web.config:</p>
  
  <p>Web.Debug.config</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"&gt;
    &lt;appSettings&gt;
      &lt;add key="Debug" value="true" xdt:Transform="Insert"/&gt;
    &lt;/appSettings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Web.Release.config</p>
  
  <pre><code>&lt;configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"&gt;
    &lt;appSettings&gt;
      &lt;add key="Release" value="true" xdt:Transform="Insert"/&gt;
    &lt;/appSettings&gt;  
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Then I created a publish profile and called it Release, but I select the Debug(OBS! important) build configuration. </p>
  
  <p>(I know. Stupid example. In my real project they were called Test and Test2.) </p>
  
  <p>When I run the publish action I get the following in the transformed Web.config:</p>
  
  <pre><code>  &lt;appSettings&gt;
      &lt;add key="webpages:Version" value="3.0.0.0" /&gt;
      &lt;add key="webpages:Enabled" value="false" /&gt;
      &lt;add key="ClientValidationEnabled" value="true" /&gt;
      &lt;add key="UnobtrusiveJavaScriptEnabled" value="true" /&gt;
      &lt;add key="Debug" value="true"/&gt;
      &lt;add key="Release" value="true"/&gt;
    &lt;/appSettings&gt;
  </code></pre>
  
  <p>Both the transformations were performed! Strange! If I change the name of the publish profile to Release2 I get following correct result:</p>
  
  <pre><code>  &lt;appSettings&gt;
      &lt;add key="webpages:Version" value="3.0.0.0" /&gt;
      &lt;add key="webpages:Enabled" value="false" /&gt;
      &lt;add key="ClientValidationEnabled" value="true" /&gt;
      &lt;add key="UnobtrusiveJavaScriptEnabled" value="true" /&gt;
      &lt;add key="Debug" value="true"/&gt;
    &lt;/appSettings&gt; 
  </code></pre>
  
  <p>What do you think? Bug?</p>