HOWTO: display your assembly @ Add Reference
By rickvdbosch
- 1 minutes read - 192 wordsYou might want to be able to let your assembly show up in the Add Reference window in Visual Studio without the user having to browse for it. When you install your assembly in the GAC, it doesn’t automatically show up in the Add Reference window, because it doesn’t enumerate all assemblies in the GAC. Installing in the GAC only eliminates the need to copy assemblies localy when referencing them. Microsoft doesn’t recommend putting assemblies in the GAC by the way…
You can add your assembly to the Add Reference window by editing the registry. First, make a new key (name not important, I’ll use ‘GumpsBlog’) in the following subkey:
HKCU – SOFTWARE – Microsoft – .NETFramework – AssemblyFolders
Then, in the key you created, let the default value point to the location where your assemblies can be found. This should look something like this (sorry for the Dutch interface, click to enlarge):
Next, restart Visual Studio and see your assemblies in the Add Reference window!
By the way, placing this registry key under the HKLM makes the assemblies in the specified folder available to any user, not just the current one…