Generating xml document transformation for Staging and Production web.config file

1.6k views Asked by At

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 ?

1

There are 1 answers

0
cwills On

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...