Custom config section: Could not load file or assembly

前端 未结 7 2220
死守一世寂寞
死守一世寂寞 2020-12-15 05:50

I\'m having a very hard time trying to access a custom configuration section in my config file.

The config file is being read from a .dll that is loaded as a plug-in

7条回答
  •  时光说笑
    2020-12-15 06:11

    Had to use the fully qualified type string of my module/plugin assembly, which is in a probing directory, so it could be located. Using EntityFramework as an example...

    Incorrect:

    type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework"
    

    Correct

    type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
    

提交回复
热议问题