Okay, this is really a three part question. I'm trying to figure out how
this whole GAC thing works.

Here goes....

1. When should you put an assembly in the GAC as opposed to just referencing
the dll in a normal windows folder?

2. When you put it in the GAC how should you reference in the project? I
would think that you shouldn't have to reference it because it's in the GAC,
but it looks like you still do? If so, what's the benefit?

3. When should you set "CopyLocal" = False in the assembly reference
properties in VS.NET?

thanks in advance.
Mark

Re: When to use the GAC and how. ? by Günter

Günter
Wed Aug 13 01:57:57 CDT 2003


"Mark" <maxmann@kc.rr.com> wrote in message
news:uENxn3RYDHA.3248@tk2msftngp13.phx.gbl...
> Okay, this is really a three part question. I'm trying to figure out how
> this whole GAC thing works.
>
> Here goes....
>
> 1. When should you put an assembly in the GAC as opposed to just
referencing
> the dll in a normal windows folder?

Put an assembly into the GAC if it's shared between applications.

>
> 2. When you put it in the GAC how should you reference in the project? I
> would think that you shouldn't have to reference it because it's in the
GAC,
> but it looks like you still do? If so, what's the benefit?

You must still reference the Assembly. The Compiler needs to get the
MetaData out of the referenced Assemblies.

How the Runtime Locates Assemblies:
-->
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconhowruntimelocatesassemblies.asp

Assembly Binding Log Viewer (Fuslogvw.exe)
-->
http://msdn.microsoft.com/library/en-us/cptools/html/cpgrffusionlogviewerfuslogvwexe.asp


> 3. When should you set "CopyLocal" = False in the assembly reference
> properties in VS.NET?

Normaly only if the Assembly is in GAC.


> thanks in advance.
> Mark

you're welcome, Günter



Re: When to use the GAC and how. ? by Josh

Josh
Wed Aug 13 08:56:14 CDT 2003

I've actually found that I don't need the GAC anymore. When I first came
from the COM world I thought I was gonna need it all the time and I tried
using it for anything that was shared. But I found that the configuration
that is needed to ensure version compatibility is too much of a pain.

I still strong name my assemblies, but I've been using local copies of the
apps. The way I see it, I'm taking full advantage of the "DLL Hell"
solution. The DLLs are tiny and I don't have to worry about one change
breaking another.

While it is a hassle if a bug is found in the DLL, to update everything, it
is more so to manage the configuration to enable version compatiblity.

Though I understand if you're exposing a .NET DLL to COM clients, it needs
to be in the cache, I believe.

Josh

"Mark" <maxmann@kc.rr.com> wrote in message
news:uENxn3RYDHA.3248@tk2msftngp13.phx.gbl...
> Okay, this is really a three part question. I'm trying to figure out how
> this whole GAC thing works.
>
> Here goes....
>
> 1. When should you put an assembly in the GAC as opposed to just
referencing
> the dll in a normal windows folder?
>
> 2. When you put it in the GAC how should you reference in the project? I
> would think that you shouldn't have to reference it because it's in the
GAC,
> but it looks like you still do? If so, what's the benefit?
>
> 3. When should you set "CopyLocal" = False in the assembly reference
> properties in VS.NET?
>
> thanks in advance.
> Mark
>
>