Skip to content

Instantly share code, notes, and snippets.

@solrevdev
Created April 19, 2017 07:36
Show Gist options
  • Save solrevdev/21eb4f201a0a6c8f10ab7b1f67c5182d to your computer and use it in GitHub Desktop.
Save solrevdev/21eb4f201a0a6c8f10ab7b1f67c5182d to your computer and use it in GitHub Desktop.
A simple example of how to add and replace web.config settings in transforms
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<appSettings>
<!-- adds -->
<add key="Key.To.Insert" value="The-Value-To-Insert" xdt:Transform="Insert" />
<!-- replaces-->
<add key="Environment" value="Release" xdt:Transform="Replace" xdt:Locator="Match(key)" />
</appSettings>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment