Is the following solution the only way to use libraries from the GAC in code?
Assembly lib = Assembly.Load("MyLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31f5625abd53197f"); Console.WriteLine(lib.GetType("MyClass").GetMethod("Start").Invoke(obj, null));
I am a little confused - I read a lot about the GAC, and I know how to sign the assembly, assembly and uninstallation of the assembly in the GAC, but I donβt know how to use it and how it helps programmers (except that it stores different versions of one and the same library). I wish that I could normally create classes, and not force the methods presented above to be called.
I do not need any work, such as: "modify the Windows registry", because I do not think that the GAC was intended for such manipulations. I want a simple answer: why do I need a GAC, does the runtime use it in some way?
What is the point of using the GAC when the code gets really ugly and hard to manage? Or maybe I'm missing something? Maybe I need to manually copy the assembly to my local folder? But I heard that this is also difficult to do.
source share