GAC : when to use (GAC hell vs DLL hell)

Posted: June 27, 2005 in Uncategorized

I saw a post in .netindiagroup regd how to manipulate the GAC  programmatically and though I had suggest few workaround for the same listing below, i had doubts on the requirement raised for the same?does it required to use GAC or not and when you ll prefer to use GAC .then i remember a long discussion but very useful one between chris sell,ala shi and useful comments by many..more which is quite useful to consider when you prefer to use GAC or not?

Two topics worth reading on this aspect are

CHRIS SELLS Avoid the GAC

ALAN SHI"S GAC Phobia

My points are :- I would suggest when should i prefer using GAC:-

1. when i need to provide an important fix to my app.

2.More then true when i need to supply backward compatibilty and my assembly to run in full trust.

3.whenever i needto share a componet between different app(no other way here).

Even though there is significant concern as raised by chris the more is with the approach we followed for our deployment and chris is true to certain extent so as few other’s who made commnets in alan shi’s response  regd the fact that  there is no other option to provide a publisher policy for the updates and which is many times a  tedious task and there is many problems for related to the same .

However without GAC also some we could have asked for the fact why there is no option avalable for backward compatibility and  componet sharing  and the GAC hell due to the wrong implementation is far better then  DLL hell which we suffered and the Binary compatibility of COM was too tedious and subject to more design restriction then the gac .atleast we can ship the publisher policy separately to avoid the same with few restriction.

Howvere even though the purpose of GAC and the usefull ness of the same are questionable with the above two discussion i found it quite astonishing as how both chris and alan didn’t have the issue realted to the dependent assembly load and the control and issue related to using partial load,assembly.load as well as the assembly.loadfrom.

The trust level associated  and the way the assembly were searched when it is local ,when it is loaded in a shared network and when it has few dependent assembly has significant changes when we are dealing with private assembly and Gaced assembly.

Soon i ll post on the same as well as I ll post the same concerns to Alan and chris.

Now ending today’s post with few  links for programming and issue /workign with gac:-

Also read for why the uninstall /install a problem and the workaround in GAC by alan shi

Why can’t I uninstall my assembly?

Undocumented Fusion:

 

Mattias’s sample:

 

sam gentile if PIA in GAC:-

 

GAC API Interface By atoenne 

 

Why do you use GAC APIs?

 

Demystifying the .NET Global Assembly Cache By Jeremiah Talkar 

 

http://www.grimes.demon.co.uk/workshops/fusWSSeven.htm


http://support.installshield.com/kb/view.asp?articleid=Q111094


http://dotnet.org.za/colin/archive/2005/05/10/19709.aspx


http://www.belshe.com/ideas/archives/000040.html

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s