Update AppSettings with XmlUpdate in build scripts

Posted by Marcus Hammarberg on January 20, 2009

I know I will chase this one for ever if I don't put it up here...

We ran into a situation where we needed to tweak the AppSettings-section of an configuration before tests in the build script.

Luckily there is help to be found. With the XmlUpdate-task (in the MSBuild Community Tasks) this can be accomplished. IF you know how to write the XPath-query.

Here is how (found it here):


Also here is a great site to pick up some XPath-skills.

If you liked this post ... here's more for you:

Published by Marcus Hammarberg on Last updated