To use or not to use GAC

F

Frederic Forjan

Hello All,

I wanted to know, if there is some good reason for or against using the
GAC ?
I've seen no strong point as a pro or a cons for using assembly in GAC
but all discussions take place in 2004...
Now, with 4 years of .NET development and your experience, what is your
advice ?

Best regards,
Frédéric
 
I

Ignacio Machin ( .NET/ C# MVP )

Hello All,

I wanted to know, if there is some good reason for or against using the
GAC ?
I've seen no strong point as a pro or a cons for using assembly in GAC
but all discussions take place in 2004...
Now, with 4 years of .NET development and your experience, what is your
advice ?

Best regards,
Frédéric

I have used it for when more than one setup project use a common DLL.
Otherwise I just copy it locally
 
F

Frederic Forjan

Ignacio Machin ( .NET/ C# MVP ) a écrit :
I have used it for when more than one setup project use a common DLL.
Otherwise I just copy it locally

What is in this case a common DLL ?
Why we should put it in GAC ? "Only" to not use lot of space on hard disk ?

Best regards
 
C

Carl Ganz

Ignacio Machin ( .NET/ C# MVP ) a écrit :







What is in this case a common DLL ?
Why we should put it in GAC ? "Only" to not use lot of space on hard disk?

Best regards- Hide quoted text -

- Show quoted text -

I've personally never used it. The main reason is to share common
assemblies but since disk space is not an issue anymore and assemblies
don't take up much room, I'd rather copy it locally than risk a
backward compaibility issue. You can maintain multiple versions of the
same assembly in the GAC but then you'd need to take an extra step to
deploy it. Why bother?

Thanks

Carl
 
P

Phil Wilson

My experience with the GAC is that it doesn't play well with Windows
Installer and consequently can be a deployment issue.
There's this, an upgrade issue: http://support.microsoft.com/kb/905238.
There's the fact that every file in an MSI setup is installed on to the
system in the same way *except* those going into the GAC - they're not
available for any code to use until after the install so dependencies on
GAC'd files you're installing are an issue. The GAC has become the System
folder equivalent. Just dump your assemblies in there and the system will
find them. Is there a good reason to have your assembly in the GAC? Saving
disk space is not a good reason IMO - is there a functional requirement, or
is there some tidiness thing saying that because it's shared you want one
copy in the GAC?
 
F

Frederic Forjan

Phil Wilson a écrit :
Is there a good reason to have your assembly in the GAC? Saving
disk space is not a good reason IMO - is there a functional requirement, or
is there some tidiness thing saying that because it's shared you want one
copy in the GAC?

No, we are starting a new project on C#.
And some people are not agreeing on using or not the GAC...

So I wanted to have your point of view about using it or not :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top