You can add the following to your <configSections>
element:
<section name="Ignored" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Frage
My App.config file is markuped as:
<configuration>
<configSections>
<section name="Custom" type="…" />
</configSections>
<Custom>
...
</Custom>
<Ignored>
...
</Ignored>
</configuration>
So, I have an configuration file, where:
When I run program, exception occurs "Unrecognized configuration section 'Ignored'".
Do I have possibility to tell ConfigurationManager to ignore this section "Ignored"?
Lösung
You can add the following to your <configSections>
element:
<section name="Ignored" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />