开发者

Working with Web.Release.config (Web.config transformation)

开发者 https://www.devze.com 2023-04-11 01:55 出处:网络
In my Web.config file have the following setup: <add key=\"ClientMail\" value=\"ridermansb@bindsolution.com\"/>

In my Web.config file have the following setup:

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

In my file I Web.Release.confi开发者_JAVA百科g:

<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>


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

0

精彩评论

暂无评论...
验证码 换一张
取 消