【发布时间】:2010-02-19 22:00:46
【问题描述】:
在 asp.net web.config 文件中你可以这样做
<appSettings file="local.appSettings.config">
<add key="foo" value="bar" />
</appSettings>
它会在 local.appSettings.config 中查找对 foo/bar 设置的任何覆盖。
applicationSettings 是否有等价物?像这样的
<applicationSettings file="local.applicationSettings.config">
<FooBar.My.MySettings>
<setting name="foo" serializeAs="String">
<value>bar</value>
</setting>
</FooBar.My.MySettings>
</applicationSettings>
甚至是维护一组不同的应用程序设置的不同方法,例如一组用于本地开发,一组用于生产
【问题讨论】:
标签: .net asp.net configuration appsettings application-settings