GAC and class library mechanisms how does it work?

  • Thread starter Thread starter Jens H. Hamann
  • Start date Start date
J

Jens H. Hamann

Hello group,

Is there anyone here that knows of a good article/whitepaper that explains
how the GAC and libraries work in the .NET framework?



I just don't understand the mechanisms behind it. The problem I am facing is
that it seems like an application and libraries are undividable.



I create an application version 1.0.0.0 that uses library 1.0.0.0. Now I
update the library with some functionality and maybe even a new public
method the version of the library is now incremented to 1.0.1.0.



If the library is not in the GAC but in the same directory as the
application it works fine the new version 1.0.1.0 if used without any
problems. But I don't want that scenario as I am using the same libraries
across many applications.



If the library is put into the GAC there are now two entries in the GAC
1.0.0.0 and 1.0.1.0 but the application is using 1.0.0.0 until it is
recompiled to use 1.0.1.0.

I guess this behavior is intended but it forces me to recompile all projects
that use a specific library if there was a bug fix or update to it.



I would prefer the old COM style where I can update just the library and all
applications using this object will automatically use the newest version, is
this in any way possible with a .NET class library?



I reckon it has something to do with the strongname because as soon as there
is a strongname associated with the library it is undividable with the
application. But the strongname is needed to put it into the GAC.







Any hints tips and articles are welcome, thanks



Jens Hamann

Agramkow Fluid Systems A/S

Email: __JHH@__agramkow.__dk (without underscores)
 
Is there anyone here that knows of a good article/whitepaper that explains
how the GAC and libraries work in the .NET framework?
http://www.grimes.demon.co.uk/workshops/fusionWS.htm


If the library is put into the GAC there are now two entries in the GAC
1.0.0.0 and 1.0.1.0 but the application is using 1.0.0.0 until it is
recompiled to use 1.0.1.0.

You can use binding redirects and publisher policy to overrride that.



Mattias
 
Thanks for you time Mattias!
I will read the given workshop files and hopefully they will help me
understand.

jens
 
Back
Top