Trying to get a simple <appSettings> for dev and prod.
My Web.config :
<appSettings> <add key="hello" value="debug" /> </appSettings>
My Web.Release.config :
<appSettings> <add key="hello" value="prod" /> </appSettings>
(both in <configuration> )
When I use it in debug mode and run my MVC site, I can do a simple return Content(WebConfigurationManager.AppSettings["hello"]); in my HomeController.Index and it returns dev . If I switch the mode to Release , it will return dev anyway. I would like to simulate prod mode without actually publishing to prod.
source share