assembly isn't listed

  • Thread starter Thread starter Neo
  • Start date Start date
N

Neo

Hi,

I added an assembly to GAC and would like to reference it.However, it wasn't
listed in the "Add Reference" window. I still had to locate it from file.
Could someone tell how to let the assembly listed in the "Add Reference"
window?
Any points would be appreciated.


Neo
 
You will need to add a key to your registry.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\AssemblyFolders

I am using 2003, so the 7.1 is 7.1, but see what you have in your registry.

Add a key called MyAssembly. And for the default value, give it the path of
your assemblies. (not the gac, but probably where you imported them from.)

The .net framework checks the GAC first when loading assemblies, so you have
nothing left to worry about.

HTH,

bill
 
Hi William F. Robertson, Jr.

Thank you for your reply.
I found a key "PublicAssemblies" in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\AssemblyFolders.
PublicAssemblies key shows a path of folder. Copy assembly to that folder
and the assembly will appear in the "Add Reference" dialog box.
However there are some assemblies other than MS's in the "Add Reference"
dialog box, but they are neither in registry nor in PublicAssemblies
folder. I was wondering how they made it.
Thanks.

Neo
 
I believe they have a special case for the .net assemblies and some third
party vendors.

I think you are missing something about the registry. Here is my
PublicAssemblies registry export.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\AssemblyFolders]
@=""

*****This is key that I added. All the assemblies I put in c:\program
files\dascweb are listed
*****in the add references dialog box.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\AssemblyFolders\Dasc
web]
@="c:\\program files\\dascweb\\"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\AssemblyFolders\Prim
ary Interop Assemblies]
@="C:\\Program Files\\Microsoft.NET\\Primary Interop Assemblies\\"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\AssemblyFolders\Publ
icAssemblies]
@="C:\\Program Files\\Microsoft Visual Studio .NET
2003\\Common7\\IDE\\PublicAssemblies"
 
Back
Top