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