When we develop asp applications, usually the Web.config file has values that allows the application to work on your development environment. Transforming Web.config file makes the deployment of applications easier, because you don’t need to change variables manually every time you deploy your application. In this article I’ll explain how to transform Web.config when deploying a web application project.
1. Open your ASP application with Visual Studio. Go to menu “BUILD -> Configuration Manager” to create the build configuration:
2. In solution Explorer, expand the Web.config file. Here you will see two files: a transform file for the Debug build (Web.Debug.config) and a transform file for the release build (Web.Release.Config):
3. Open the transform file for the build configuration that you want to work with. Edit the transform file to set the changes that you want to apply when you application gets deployed:
4. This feature will save you deploying and development time, especially if you need to deploy your application in different environments. Just make sure you enter the right data source and database credentials before deploying.
This concludes Transform Web.config When Deploying a Web Application Project.