|
Home > Archive > microsoft.public.cert.exam.mcsd > May 2004 > using the GAC
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Session 2004-05-03, 3:26 pm |
| can someone tell me how to reference a dll that is
installed on the GAC? I keep trying to do so, but I end
up just getting a local copy of the dll in my bin file,
not the version that is on the GAC. How should I
reference it from a project? the add reference procedure
doesn't include items in the GAC. Thanks
Session
| |
|
| Session wrote:
> can someone tell me how to reference a dll that is
> installed on the GAC? I keep trying to do so, but I end
> up just getting a local copy of the dll in my bin file,
> not the version that is on the GAC. How should I
> reference it from a project? the add reference procedure
> doesn't include items in the GAC. Thanks
You should keep a local copy of any .dll installed in the GAC. Just use
the local copy for the purpose of making a reference.
The pathname is not important in this. If you reference a local copy,
it will still use the one in the GAC at runtime. The Framework process
of locating a DLL is called "Fusion".
This is an important area for most of the cert tests - you need to
understand deployment pretty well. Kalani does a pretty good job of
explaining it.
Eric
| |
| The Poster Formerly Known as Kline Sphere 2004-05-04, 1:24 pm |
| >You should keep a local copy of any .dll installed in the GAC. Just use
>the local copy for the purpose of making a reference.
just to add to that. This is mandatory if you want your component to
appear in the vs.net references.
Kline Sphere (Chalk) MCNGP #3
| |
| The Poster Formerly Known as Kline Sphere 2004-05-04, 2:24 pm |
| >How should I
>reference it from a project? the add reference procedure
>doesn't include items in the GAC.
Yes it does, but only if vs.net knows where to look for your
assembles!
Assuming you have done the basic's correctly, i.e. created a keyfile
with the strong name tool, added a entry in your assemble file to
point to keyfile and added the assemble to the gac, then....
In order to be able to view your assembly in the vs.net 'add
references | .net' tab, you need to add an entry to the registry - See
KB article 306149 in the MSDN which tells you how to do this.
Kline Sphere (Chalk) MCNGP #3
|
|
|
|
|