[英]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.