5
votes

In my Web.config file have the following setup:

<add key="ClientMail" value="[email protected]"/>

In my file I Web.Release.config:

<appSettings>
    <add key="ClientMail"
                xdt:Transform="SetAttributes"
                xdt:Locator="Match(value)"
                value="[email protected]"/>
</appSettings>

How do I get when running the site in Release mode, the settings are being applied in Web.Release.config?

In this case I need to change the value of a setting in <appSettings>

1

1 Answers

7
votes

I believe this only applies when publishing a release. Otherwise you need to include a build event to cause a merge in a config build for a named build config. If you are interested in that let me know and I'll find my post on here regarding that.

Learn about web config transformations here: http://weblogs.asp.net/gunnarpeipman/archive/2009/06/16/visual-studio-2010-web-config-transforms.aspx