Question

Like most people I'm using teamcity as a CI tool and I'm also using web config transformations quite heavily, a lot of times to insert config values.

My build process is generally to build the entire solution and then (using msdeploypublish) deploying the website to a website.

Because I'm running msbuild twice, the config transformations are being run twice and so I'm ending up with duplicate values in the final versions of the config files (mainly web.config but I have others as well).

Is there a way to only run the config transformations the one time, for example by using a parameter in msbuild that will stop it from happening?

Was it helpful?

Solution

I've found the slightly undocumented InsertIfMissing which seems to do the job.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top