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.)
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>"
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With