Item 5 of 23 Previous | Next

2
Vote

Could not load file or assembly... The system cannot find the file specified.

description

Tried creating a pretty basic configuration: a single collection of strings. The files generated fine, and I copied over the config info to my web.config. However at run time, when accessing values, I get this exception:

"An error occurred creating the configuration section handler for javaScriptSettings: Could not load file or assembly 'WebDemo.Lib' or one of its dependencies. The system cannot find the file specified."

What's going on here? I've double and triple checked that I copied over the config section handlers properly.

No files are attached

comments

fighting_1r1sh wrote Feb 20 at 4:03 PM

I had exactly the same issue:
the workaround is to change type="MyLib.MyConfigSection, MyLib" to type="MyLib.MyConfigSection, WebDemo" as WebDemo is your assembly name!!

andym1978 wrote Jan 10 at 2:27 PM

Your config must be failing during the configSections load where it loads all assemblies specified in the "type" attributes (example below). Make sure that all assemblies that are references by your WebDemo.Lib are also referenced in your web project, since CSD needs to see them all.

<?xml version="1.0"?>
<configuration>
<configSections>
<section name="MyConfigSection" type="MyLib.MyConfigSection, MyLib"/>