What's the best way to handle web.config file versions in ASP.Net?
Posted
by MusiGenesis
on Stack Overflow
See other posts from Stack Overflow
or by MusiGenesis
Published on 2010-04-14T02:56:04Z
Indexed on
2010/04/14
3:03 UTC
Read the original article
Hit count: 230
I have an ASP.Net web site (ASPX and ASMX pages) with a single web.config file. We have a development version and a production version. Over time, the web.config files for development and production have diverged substantially.
What is the best practice for keeping both versions of web.config in source control (we use Tortoise SVN but I don't think that matters)? It seems like I could add the production web.config file with a name like "web.config.prod", and then when we turnover all the files we would just add the step of deleting the existing web.config and renaming web.config.prod to web.config.
This seems hackish, although I'm sure it would work. Is there not some mechanism for dealing with this built in to Visual Studio? It seems like this would be a common issue, but I haven't found any questions (with answers) about this.
© Stack Overflow or respective owner