5

In my Web.config file have the following setup:

<add key="ClientMail" value="ridermansb@bindsolution.com"/>

In my file I Web.Release.config:

<appSettings>
    <add key="ClientMail"
                xdt:Transform="SetAttributes"
                xdt:Locator="Match(value)"
                value="ridermansb@gmail.com"/>
</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>

ridermansb
  • 10,779
  • 24
  • 115
  • 226

1 Answers1

8

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

David Silva Smith
  • 11,498
  • 11
  • 67
  • 91
Adam Tuliper
  • 29,982
  • 4
  • 53
  • 71