Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我在类库中定义应用程序级别设置(使用 Properties.Settings),我可以在将该 dll 部署到应用程序后更改这些设置吗?如果是这样,怎么做?我是否只是在 web.config 中创建等效设置来覆盖它?
我发现您必须在 web.config 中为类库 dll 声明一个部分。因此,如果您的命名空间是“Company.Application.DataLayer”,则需要在“applicationSettings”部分中声明“Company.Application.DataLayer.Properties.Settings”部分。
注意:要识别该部分,您还必须在 web.config 的 applicationsettings sectionGroup 中声明它。