Take the 2-minute tour ×

I am just starting my first MVC Web Application and have noticed that I now not only have a Web.config file in the root, but 2 sub-files, for Debug and Release configurations. I've read up a bit on what this is, in that I can put specific configurations for my different environments in each file, but I am confused as to when these seperate files are actually used.

Do I HAVE to use the built in Deployment/Publish tools within Visual Studio in order to benefit from this, or, if I set my build mode to Release, and do a simple build of my web application, then deploy the compiled files, along with the Web.config AND Web.Release.config, would that work?

I'm just not sure what deployment options I have to take advantage of these seperate config files?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

In simple cases you can use them with the build in deployment functions. Visual studio takes your actual build configuration and uses the mapped Web.config transformation. In more complex deployment scenarios you can use them with MSBUILD. Look here

share|improve this answer
add comment

Your Answer


