Handling configuration files
Examples
Adding or updating appsettings
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<appSettings xdt:Transform="InsertIfMissing">
<!-- Updates the value of the appSetting called owin:appStartup -->
<add key="owin:appStartup" value="MyCustomOwinStartup" xdt:Locator="Match(key)" xdt:Transform="SetAttributes(value)" />
<!-- Adds the appsetting MyOwnAppSetting, if it isn't already there -->
<add key="MyOwnAppSetting" value="AmazingValue" xdt:Locator="Match(key)" xdt:Transform="InsertIfMissing" />
<!-- Ensures a custom value is there and set to a certain value (remove and add) -->
<add key="MyOwnAppSetting2" xdt:Locator="Match(key)" xdt:Transform="RemoveAll" />
<add key="MyOwnAppSetting2" value="AmazingValue2" xdt:Locator="Match(key)" xdt:Transform="InsertIfMissing" />
</appSettings>
</configuration>Setting the Simple Mail Transfer Protocol (SMTP) settings for the child project
Setting custom rewrite rules for the child project
Last updated
Was this helpful?