Contains notes and lessons in working technology, especially .NET, Azure, DevOps, Agile, and Team Foundation Server.
Tuesday, May 8, 2012
Config Transforms for Elements
I would have thought this was obvious, but it took me a bit to figure it out. The config file transforms that are available for web.config files and for all other files can be used to replace sections of a config file, based on a project configuration. Most of the examples show changing attributes. I wanted to change the entire element, in this instance, connectionStrings. To do this, you simply put the Replace value in the Transform attribute on the element:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.