Gunnar Peipman's ASP.NET blog

ASP.NET, C#, SharePoint, SQL Server and general software development topics.

Sponsors

News

 
 
 
 
 
DZone MVB

Links

Social

Visual Studio 2010: Multiple web.config versions

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.

Multiple web.config files When web application is created then it has two configurations: Debug and Release. Visual Studio 2010 creates also two versions of web.config file as is seen on the image. Depending on active configuration correct web.config will be selected. This technique is called web.config transformation and it allows very powerful transformations of configuration files.

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.


kick it on DotNetKicks.com pimp it Shout it

Comments

DotNetShoutout said:

Thank you for submitting this cool story - Trackback from DotNetShoutout

# June 2, 2009 6:19 PM

DotNetBurner - ASP.net said:

DotNetBurner - burning hot .net content

# June 2, 2009 6:22 PM

PimpThisBlog.com said:

Thank you for submitting this cool story - Trackback from PimpThisBlog.com

# June 2, 2009 6:23 PM

DotNetKicks.com said:

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# June 2, 2009 6:25 PM

Gunnar Peipman's ASP.NET blog said:

Here are my postings about Visual Studio 2010 and .Net Framework 4.0 that may be interesting to my readers

# June 2, 2009 6:36 PM

Web Development Community said:

You are voted (great) - Trackback from Web Development Community

# June 2, 2009 11:44 PM

Sanjeev Agarwal said:

Daily Tech Links - June 4, 2009 Web Development ASP.NET MVC Training Kit Visual Studio 2010: Multiple

# June 4, 2009 3:24 AM

theBlogfor.NET said:

Visual Studio 2010: Multiple web.config versions

# June 4, 2009 9:45 AM

visual studio 2005 » Blog Archive » .NET Web Developer - TechSales, LLC - Phoenix, AZ said:

Pingback from  visual studio 2005  » Blog Archive   » .NET Web Developer - TechSales, LLC - Phoenix, AZ

# June 6, 2009 1:09 PM

Code Monkey Labs said:

Lots of good stuff this week – not one, not two, but three posts worthy of ‘Pick of the week’ treatment! Picks of the Week I Hardly Recognize You Fighting Technical Debt with the Wall of Pain A Different Shade of Rose, or “How to…actually, I’m not up

# June 8, 2009 12:51 PM

Meerdere web.config versies is Visual Studio 2010 at Superdopey’s Techblog said:

Pingback from  Meerdere web.config versies is Visual Studio 2010 at  Superdopey’s Techblog

# June 10, 2009 5:12 AM

Dave Durose said:

It's about time!  This is LONG overdue.

# June 12, 2009 2:36 PM

Visual Studio 2010: Web.config transforms | rapid-DEV.net said:

Pingback from  Visual Studio 2010: Web.config transforms | rapid-DEV.net

# June 16, 2009 8:55 AM

Joe said:

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

# February 10, 2010 6:00 AM

DigiMortal said:

Hi Joe!

AFAIK multiple config versions are only in web application projects available.

# February 10, 2010 7:18 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)