One easy way to manage environment configurations is by using transformation files. By default, two transformation configuration files are created for a web application, Web.Debug.config and Web.Release.config. You can create custom transformation configuration files by right-clicking the Web.Config file and choosing “Add Config Transform”.

If the menu option is disabled, it means that you have not created any custom build configurations.

Typical build configurations: test, stage, and production.


Examine the Web.Release.config file; this file will give you a good start on transformation. Web.Release.config simply removes the debug attribute. You can right-click the file to preview the transformation.


The preview will show you the original Web.Config file and the transformed Web.Config file indicating what transformation file was applied and added/changed/removed lines.


Managing application configurations through transformations will enable you to version control your environment configurations. You can transform about anything from “appSettings” to “connectionStrings” and others. To learn more about configuration tranformations, follow this link.

Like this post? Share it!