title: ASP.NET MVC3: Debug and Release app settings not working
body: <p>My debug and release web.config app settings are not being read correctly.</p>
  
  <p>Web.config:</p>
  
  <pre><code>&lt;appSettings&gt;
   &lt;add key="webpages:Version" value="1.0.0.0"/&gt;
   &lt;add key="ClientValidationEnabled" value="true"/&gt;
   &lt;add key="UnobtrusiveJavaScriptEnabled" value="true"/&gt;
  &lt;/appSettings&gt;
  </code></pre>
  
  <p>Web.Debug.config</p>
  
  <pre><code>&lt;appSettings&gt;
      &lt;add key="ErrorEmailAddress" value="developerEmail@email.com" /&gt;
      &lt;add key="TestModeEmailAddress" value="developerEmail@email.com" /&gt;
  &lt;/appSettings&gt;
  </code></pre>
  
  <p>Web.Release.config</p>
  
  <pre><code>&lt;appSettings&gt;
      &lt;add key="ErrorEmailAddress" value="prodErrorEmail@email.com" /&gt;
  &lt;/appSettings&gt;
  </code></pre>
  
  <p>However, calling:</p>
  
  <pre><code>WebConfigurationManager.AppSettings["ErrorEmailAddress"]
  </code></pre>
  
  <p>is returning null (when debugging).</p>
  
  <p>I have tried adding xdt:Transform="Insert" e.g.</p>
  
  <pre><code>&lt;add key="ErrorEmailAddress" value="prodErroEmail@email.com" xdt:Transform="Insert" /&gt;
  </code></pre>
  
  <p>Any ideas?</p>