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 f
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>"
Use this command under Visual studio command prompt
regsvr32 /u shfusion.dll
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.
"C:\WINDOWS\assembly" is a special folder which in Windows Explorer will list the assemblies (and the assembly info) within the various sub-folders.
For your case, you might need to point it to the physical path which is "C:\Windows\assembly\GAC_MSIL.....dll" within VS.NET.
Alternatively, I edited the Project file and added the reference manually.
gacutil /i "Foo.dll"
gacutil /l
will give you the list from which you can pick.<Reference Include="Foo, Version=x.x, Culture=neutral, PublicKeyToken=xxx, processorArchitecture=MSIL" />
You can also map the GAC folder to a virtual drive, and then you can add GAC reference through browse tab.
Manual by MZ-Tools