在 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>
甚至是维护一组不同的应用程序设置的不同方法,例如一组用于本地开发,一组用于生产