Roland
Roland

Reputation: 5438

Changing web.config in Team city

We have a developmentprocess where the developers modifies the web.config to match their personal setup. For deploment we have other web.config-files with suffixes, eg web.config.test.

Is there a way to tell Team City to use the .test version of web.config instead of the default one?

Thanks in advance Roland

Upvotes: 1

Views: 1983

Answers (2)

Arve Systad
Arve Systad

Reputation: 5479

You should use a tool like Slow Cheetah to aid you in XML-transformation of all your config files (if you have more than one) - then create the necessary build configs in Visual Studio (instead of just Release and Debug, add for example Release.QA, Release.Production or others). You then give Team City the Build configuration name as input for whatever build you want to do. Same goes for publishing from Team City.

Upvotes: 0

KIR
KIR

Reputation: 5692

Add a first step in your build (if you use TeamCity 6.0) which would copy web.config.test to web.config.

Upvotes: 2

Related Questions