Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computer Certification > MCSD > using the GAC

Reply
Thread Tools

using the GAC

 
 
Session
Guest
Posts: n/a
 
      05-03-2004
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


 
Reply With Quote
 
 
 
 
Eric
Guest
Posts: n/a
 
      05-04-2004
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
 
Reply With Quote
 
 
 
 
The Poster Formerly Known as Kline Sphere
Guest
Posts: n/a
 
      05-04-2004
>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
 
Reply With Quote
 
The Poster Formerly Known as Kline Sphere
Guest
Posts: n/a
 
      05-04-2004
>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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help using assemblies from GAC dimagofman@googlemail.com ASP .Net 5 06-26-2007 06:28 PM
Registering DLL using GAC Util stephen ASP .Net 1 07-31-2006 11:31 PM
Trying to reference a DLL (located in the GAC) from a JIT compiled page using codebehind. Jason Kendall ASP .Net 2 02-04-2005 06:45 PM
Using Custom Assembly Installed in GAC =?Utf-8?B?Q2hyaXMgRmluaw==?= ASP .Net 5 11-01-2004 09:05 PM
Referencing assembly from GAC using @assembly fails Brent ASP .Net 1 01-23-2004 08:23 PM



Advertisments