Visual Studio 2010 has support for multiple web.config files. It is one feature of new web application packaging and deployment system. We can create now separate web.config files for each configuration we have for application.
We can easily add new configurations and add web.config files for them right through Visual Studio 2010 IDE.
Web.config file is like template for configurations. Also you can handle it as default configuration. Configuration specific configuration files may add settings or change current ones. This is done using simple transformation tags.
Visual Studio 2010 also allows generation of web.config versions using command-line and MSBuild.
Visual Web Developer Team Blog has very good posting about web.config transformation. This posting is titled as Web Deployment: Web.Config Transformation and it gives you complete overview about transformations and packaging of web.config files.
If you want to try these things out on hosting environment then take a look at my blog entry Free ASP.NET 4.0 beta hosting available and Visual Web Developer Team Blog entry Free Web Hosting to try ASP.NET 4 Beta1, VS 2010 Beta1 and MS Web Deployment Tool RC1.
View Comments (2)
Hey Gunnar. Just installede the RC of VC2010. I had a hardtime finding the multiple .config files. Untill i realised it was only avaliable on web applications. Is this right, that there is no config tranformations for normal Windows Forms projects and other project types?
Thanks
Hi Joe!
AFAIK multiple config versions are only in web application projects available.