[英]Tell ConfigurationManager to ignore App.config section
我的App.config文件标记为:
<configuration>
<configSections>
<section name="Custom" type="…" />
</configSections>
<Custom>
...
</Custom>
<Ignored>
...
</Ignored>
</configuration>
所以,我有一个配置文件,其中:
当我运行程序时,异常发生“无法识别的配置部分'忽略'”。
我是否有可能告诉ConfigurationManager忽略此部分“忽略”?
您可以将以下内容添加到<configSections>
元素:
<section name="Ignored" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.