When you add a reference to a project in Visual Studio there are several tabs to allow you to “quickly” pick an assembly to reference. The .net tab is the first and, at first glance, appears to show all assemblies registered in the Global Assmbly Cache (GAC). It is, however, not associated with the GAC in any way. It is simply a list of dlls that can be reference quickly. The dll’s listed in the .net tab do not have to be registered in the GAC. In order to get your dll to show up, you need to add a registry key that points to the folder where your dll resides. When Visual Studio starts up, it looks through all the folders listed in the associated registry keys and adds any dlls it finds (whether or not it is registered in the GAC) to the list of available dlls.
When you add a reference from the .Net tab, Visual Studio simply goes to the specified physical location of the dll and adds the appropriate reference (if it is a private assembly it copies the dll – if shared, it adds the reference to the GAC).
Here is the KEY Path.
To add your folder to the list:
- Right-Click the AssemblyFolders Key and select New -> Key
- Name the new Key
- The new key will have a default string with no value
- Add the path of your dll folder to the “(default)” string
- Restart Visual Studio and your dll will appear in the .Net tab
Leave a Reply