We are planning to use XDT concept for automating the web.config settings in Staging and Production. We already have the web applications created long time back using Visual Studio in c#.Net. All our applications have a web.config already inside them (under which we have web.debug.config and web.release.config)
I have taken the web.config from current staging and PROD environments. Now do I create the web.PROD.config and web.Staging.config xdt (xml transform) files(based on the backups I have taken from the current Staging and PROD environments) and also make sure the web.config which is already there in the solution is also updated accordingly ?
My current plan is to do that manually but we its going to taking lot of time. Is there a way I can do this from Visual Studio or any other tool ?
https://github.com/CameronWills/FatAntelope This command line tool will compare two web.config files and generate a XDT transform from the difference. So you can run it with your development web.config and production web.config and get a web.release.config file out.
Disclaimer: I wrote it...
来源:https://stackoverflow.com/questions/27231040/generating-xml-document-transformation-for-staging-and-production-web-config-fil