I have an ASP.Net website (ASPX and ASMX pages) with one web.config file. We have a development version and a production version. Over time, web.config files for development and production diverge significantly.
What is the best practice of storing both versions of web.config in version control (we use Tortoise SVN, but I donβt think it matters)? It looks like I can add a web.config file for production with a name like "web.config.prod", and then when we wrap all the files, we just add the step of deleting the existing web.config and renaming web.config.prod to web. config.
It seems hacky, although I'm sure it will work. Is there any mechanism for working with this built-in in Visual Studio? This seems to be a common problem, but I did not find any questions (with answers) about this.
source
share