문제

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.

도움이 되었습니까?

해결책

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?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top