title: MVC Web.Debug.Config Question Concerning Debug Mode
body: <p>This is probably a quick question.  I'm very new to solution configurations and web.config xml file transformations.  I wanted to add a transformation to set the debug attribute for the compilation element of an Asp.Net Mvc website to true:</p>
  
  <p>Web.Debug.config:</p>
  
  <pre><code>  &lt;system.web&gt;
      &lt;compilation debug="true" xdt:Transform="SetAttributes(debug)" /&gt;
    &lt;/system.web&gt;
  </code></pre>
  
  <p>Web.config:</p>
  
  <pre><code>&lt;compilation targetFramework="4.0"&gt;
    &lt;assemblies&gt;
           ...
    &lt;/assemblies&gt;
  &lt;/compilation&gt;
  </code></pre>
  
  <p>but when I press F5, a window pops up in Visual Studio saying "The page cannot be run in debug mode because debugging is not enabled in the web.config file."  It then gives me the option to alter the Web.config file.  But I thought the point of the Web.Debug.config file was to allow this to get set automatically...  Can I get Visual Studio to use the transformed Web.config file after pressing F5?</p>
  
  <p>Many thanks in advance!</p>
  
  <p>Andrew</p>