Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GAC Assembly Missing in Add Reference dialog

I have an Interop assembly lying in GAC; Windows Explorer clearly shows it listed in the C:\WINDOWS\assembly folder. Yet, when I try to add a reference to it in from Visual Studio, I can't see it anywhere in the Add Reference dialog.

If this is happened to you too, what is the reason for this? And how do I fix this?

(The assembly is actually located in C:\WINDOWS\assembly\GAC_MSIL folder, if you must know.)

like image 673
Frederick The Fool Avatar asked Dec 19 '09 13:12

Frederick The Fool


2 Answers

Add one of the following registry keys, where is the directory to search, and MyAssemblies is the category of your assemblies. Note HKCU is for the current user and HKLM is for everyone on the same computer.

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework\<version>\AssemblyFoldersEx\MyAssemblies]@="<AssemblyLocation>"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\<version>\AssemblyFoldersEx\MyAssemblies]@="<AssemblyLocation>"
like image 139
Sheng Jiang 蒋晟 Avatar answered Nov 09 '22 23:11

Sheng Jiang 蒋晟


I've created a tool that will help you to achieve your goal. Muse VSReferences will allow you to add a Global Assembly Cache reference to the project from Add GAC Reference menu item.

like image 26
BALKANGraph Avatar answered Nov 09 '22 23:11

BALKANGraph