I was reading this http://blogs.msdn.com/b/webdev/archive/2009/05/04/web-deployment-web-config-transformation.aspx but when I right click on web.config in Visual Studio the “Add Coding Transforms” is grayed out. (I am not debugging or anything.)
Basically, I want to change my connection strings based on what server I’m publishing to. I have a dev server, and I have a productions server.
What way can I accommodate this in ASP.NET MVC?
Currently, there exist two files under my web.config: Web.Debug.Config and Web.Release.Config.
Thank you.
You need to open the Solution Configuration dropdown and add a new configuration.
Note that you can have different compile constants, code contract settings, etc when you do this. Be sure to copy an existing configuration (ie, Release). Also, Code Contract settings DON’T currently copy.