Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Failed to load provider type

Failed to load provider type

Scheduled Pinned Locked Moved C#
data-structuresdebugginghelpquestionannouncement
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    paulb
    wrote on last edited by
    #1

    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.

    H 1 Reply Last reply
    0
    • P paulb

      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.

      H Offline
      H Offline
      Hesham Amin
      wrote on last edited by
      #2

      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

      P 1 Reply Last reply
      0
      • H Hesham Amin

        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

        P Offline
        P Offline
        paulb
        wrote on last edited by
        #3

        ah well, I thought I could find a way around the problem but you pretty much confirmed what I was thinking. thanks,

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups