ArticleDirectory
- Add your assembly to Visual Studio
- Multiple versions of same Assembly
When you attempt to add an Assembly reference to a Visual Studio project,Add referenceDialog appears with a list of registered global assemblies in. NetTab:
Add your assembly to Visual Studio
Unfortunately, adding your assembly to the Global Assembly Cache (GAC) does not make it automatically appear in the Visual Studio list of installed assemblies; you must add your Assembly manually as follows:
RunRegeditTo edit the Windows registry.
- Navigate toHKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \. netframework \ assemblyfoldersKey.
- Right click onAssemblyfoldersKey, then selectNew> key. Enter the name of your assembly (without the. dll extension ).
- Double click on the key's(Default)Value.Edit stringDialog will appear. Enter the full pathOf the folderWhere your Assembly resides. Note that all assemblies in that folder will appear in the Visual Studio list.
- Important! You must exit and restart Visual Studio to see your assembly inAdd referenceDialog.
Multiple versions of same Assembly
Note that if you add multiple versions of the same assembly to the GAC, And you want all versions to appear in the Visual Studio list of installed assemblies, you have two options:
- Provide a different name for each version of the Assembly, such as mylib1.0.dll and mylib2.0.dll, or
- Store each version of the Assembly in its own folder, and add each folder to the Registry as shown above.