Editing configuration files

I have a feature subjection. I need to do complex manipulations in my web.config files for each environment and the current variable system just doesn’t cut it. What would be great is a feature that allows you to input a regular expression and what you want it to replace for a given environment.

example
regular expression: “(?<=compiler language=”)[\W\w\s0-9][^"]+(?=")"
replace: "test-replace"
Environment: Testing
Machine: All
Step: All

example :: http://regexr.com?2v5rl

Obviously I don’t need to change the compiler language for different environments but for things like :
that needs to turn into for the development environment.

Or is this possible with the variable system? If so, how can I do it?

Hi Patrick,

It can’t be done with the variable system (currently, though it’s a good idea), but you can use web.config transformations:

http://msdn.microsoft.com/en-us/library/dd465326.aspx

For example, you would have a Web.Prod.config that changes the path of your <appSettings section in Prod releases.

Hope that helps,

Paul