Assembly.Load error Could not load file or assembly 'X' or one of its dependencies. The system can not find the specified file

0

I'm having an error while using Assembly.Load(X); . The path is right, I think it is giving error when trying to load a dependency from the assembly. But I find it strange that in Visual Studio 2017 I can import the assembly into my project without any errors. The LoadFrom and LoadFile does not work, loads the current assembly of the code. I'm using .Net 3.5 .

    
asked by anonymous 08.01.2018 / 17:00

1 answer

0

Verify that the AppPool user has access to this DLL and its dependencies.

If you have, verify that the path of the DLL specified in the Load method is correct.

One possible error is the versions of the DLLs and their dependencies, even though the DLL required as dependency is in the folder its version might be wrong.

Another point, which may occur when the build is being generated, the DLL you are expecting is not being copied to the application folder.

    
08.01.2018 / 18:36