What are the Web.Debug.config and Web.Release.Config files for?

It’s the new Web.config transformation feature of Visual Studio 2010. More information here.


Edit:

Are these files used to specify debug and release specific settings, so you don’t clutter up the main web.config?

It isn’t limited to three files, you could (in theory) have as many files as you have environments. The “top level” Web.config provides a template of your web config. The files under it provide replacement values specific to that environment (like if you have different connection strings for local/stage/test/whatever).

Does it even make sense to place a connection string in the root web.config file if I have have a local and remote one in the debug and release web.configs respectively.

It would only make sense if it wasn’t going to change between environments. Sounds like in your case it does so, in your case no, it would not make sense to leave it in the Web.config.

Leave a Comment