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

Asked

Viewed 312 times

0

I’m making a mistake using the Assembly.Load(X);. The way is right, I think you are giving error when trying to load a dependency from Assembly. But I find it strange that in Visual Studio 2017 I can import Assembly to my project without any mistakes. The LoadFrom and LoadFile does not work, loads the current Assembly of the code. I am using the .Net 3.5.

1 answer

0

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

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

One possible error is the versions of the Dlls and their dependencies, although the DLL required as dependency is in the folder its version may be wrong.

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.