tags:

views:

62

answers:

1

I'm looking for a way to edit a configuration file (web.config in an asp.net project) in a Team Build.

Specifically I'm looking at either uncommenting or adding identiy impersonate in the config file before copying the built web application to its destination.

I know that it's possible to have multiple config files and copy one over the other (we're using this approach to have different configurations for development, production, demo, etc), but in this case it would be nice to keep the configuration in a single file since the only change here is whether or not identity impersonate should be false or true.

I've been googling for a while now without finding any solution to this, but maybe there are someone here which could either help me figure out how or simply state that it's not possible. Any ideas?

+1  A: 

Have a look at http://www.codeplex.com/sdctasks

It's a set of build tasks which allow you to do all sorts of fun things. There are several tasks which are web(site) related, but if it comes to it, there are XML tasks too which should allow you to manipulate the file appropriately

James Ogden
Cool, thanks. I found a replace task there which should solve this for me
Geir-Tore Lindsve