Failed to load provider type
-
I'm getting an exception thrown when trying to use a 3rd party library from my DLL, it works fine if I use this library from an Exe but not the DLL. I suspect its to do with it trying to access a config file. This is (part of) the stack trace:
Inner Exception: Failed to load provider type: ERSP.Utilities.Configuration.LocalFileModuleSettingsProvider, xFx, Version=2.1.2868.1848, Culture=neutral, PublicKeyToken=null. (ConfigurationErrorsException) Stack: at System.Configuration.ApplicationSettingsBase.get_Initializer() at System.Configuration.ApplicationSettingsBase.CreateSetting(PropertyInfo propInfo) at System.Configuration.ApplicationSettingsBase.EnsureInitialized() at System.Configuration.ApplicationSettingsBase.get_Context() at System.Configuration.ApplicationSettingsBase.set_SettingsKey(String value) at xFx.Properties.Settings..ctor() at xFx.Properties.Settings..cctor()
It looks like its using a custom configuration provider, maybe its just buggy? and maybe it will work if the config file is avialble so... Is it possible to have an app.config file with a DLL? I tried adding one to the project, didn't seem to help. -
I'm getting an exception thrown when trying to use a 3rd party library from my DLL, it works fine if I use this library from an Exe but not the DLL. I suspect its to do with it trying to access a config file. This is (part of) the stack trace:
Inner Exception: Failed to load provider type: ERSP.Utilities.Configuration.LocalFileModuleSettingsProvider, xFx, Version=2.1.2868.1848, Culture=neutral, PublicKeyToken=null. (ConfigurationErrorsException) Stack: at System.Configuration.ApplicationSettingsBase.get_Initializer() at System.Configuration.ApplicationSettingsBase.CreateSetting(PropertyInfo propInfo) at System.Configuration.ApplicationSettingsBase.EnsureInitialized() at System.Configuration.ApplicationSettingsBase.get_Context() at System.Configuration.ApplicationSettingsBase.set_SettingsKey(String value) at xFx.Properties.Settings..ctor() at xFx.Properties.Settings..cctor()
It looks like its using a custom configuration provider, maybe its just buggy? and maybe it will work if the config file is avialble so... Is it possible to have an app.config file with a DLL? I tried adding one to the project, didn't seem to help.You have to put the config file with the exe that references the dll, you can't have a separate app.config for the dll.
Hesham A. Amin My blog
-
You have to put the config file with the exe that references the dll, you can't have a separate app.config for the dll.
Hesham A. Amin My blog