referencing assemblies in the GAC

IfYouSaySo

Well-known member
Joined
Jan 4, 2006
Messages
102
Location
Hermosa Beach, CA
Programming Experience
3-5
I'm having a probem referencing assemblies in the GAC. If I browse to C:\Windows\assemblies\, this is the list of assemblies that are registered on my system, correct? I have an assembly: Act.Shared.ComponentModel.dll, for example. I assumed that when I have an assembly listed in the GAC, that means when I create a new project in visual studio, I can import it with:
VB.NET:
Expand Collapse Copy
Imports Act.Shared.ComponentModel

Of course, this doesn't work...does someone know what I'm doing wrong?
 
During development you reference the local assembly (dll file), the one in GAC is used during runtime. You can set "copy local" property of that reference to False.

It still is 'possible' to add items to the Add Reference dialog list (which is file based - and not a list of GAC), you do this with a registry modification to point to the file location of the dll file.

See MS article "How to display an assembly in the Add Reference dialog box"
 
Back
Top