Custom ConfigurationSection type not loading correctly

Every time I do ConfigurationManager.GetSection("registeredPlugIns")for this custom section, I get this error:

An error occurred creating the configuration section handler for registered PlugIns:

Failed to load type 'Engine.PlugInArch.PlugInConfigurationSection' from the assembly 'System.Configuration, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a ".

Why is he trying to load the type from System.Configuration, and not the assembly I'm asking for?

Here is my section code:

namespace Engine.PlugInArch
{
    public class PlugInConfigurationSection : ConfigurationSection
    {
        [ConfigurationProperty("plugIns", IsDefaultCollection = false),
         ConfigurationCollection(typeof(PlugInCollection), AddItemName = "addPlugin")]
        public PlugInCollection PlugIns
        {
            get { return this["plugIns"] as PlugInCollection; }
        }

    }
}

And here is my app.config

<configuration>
    <configSections>
    <section name="registeredPlugIns" type="Engine.PlugInArch.PlugInConfigurationSection, Engine"/>
    </configSections>
        ...
    <registeredPlugIns>
       <plugIns>
           <addPlugIn DllName="ProcessorPlugin.dll"/>
       </plugIns>
     </registeredPlugIns>

</configuration>
+5
source share
1 answer

DLL Engine.dll? , , .

, procmon sysinternals. = "NAME NOT FOUND". , Engine.dll Engine.exe. , , , , .

+10

All Articles