Question

I have full name of assembly. I don't know is it referenced, custom or GAC library, the only information is its name. Assembly.Load/LoadFile/LoadFrom these methods work only if searched library is in folder where project runs. If library is GAC library, then it arises exception like "Could not load file or assembly 'gac_library_name' or one of its dependencies. The system cannot find the file specified" . I can solve this problem by finding path to GAC library, then load it. But is there any way to load any library using only its name?
P.S. there are several questions related to this, but they work for libraries if it's in same folder of project runs. For GAC libraries I couldn't find anything.

Was it helpful?

Solution

If you trying load and assembly from GAC, you should use its full name (include version, culture etc.)

Here is related question: C#: How to load assembly from GAC?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top