Getting assemblies to show in the .NET tab of Add Reference

ぃ、小莉子 提交于 2019-11-28 10:26:18

You need to make a registry entry to tell Visual Studio which folders to show assemblies for. This article explains how to do it:

http://www.platinumbay.com/blogs/dotneticated/archive/2008/09/02/add-reference-and-the-gac.aspx

We don't use the GAC anymore as it is a cumbersome process that wasn't giving benefit to our team members. We solve the consistent path issues using project references for our own assemblies. Third party assemblies go in a folder within the solution and we reference the assemblies in the projects from there. This way everyone has them in the same path with no worries.

You need to add a registry key like:

[HKEY_CURRENT_USER\SOFTWARE\Microsoft.NETFramework\AssemblyFolders\MyAssemblies]@="C:\MyAssemblies"

You can see more on this at: http://support.microsoft.com/kb/306149

This is probably a VFAQ, even though I'm quite new here. The basic concept here is that the list of assemblies is loaded based on a setting in the Registry.

All you need to do is to add a registry subkey which points to the location of the assembly under the following key:

HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\

If MyAssemblyFolder is the name of your folder where your Assembly to be added resides, create a subkey with any name and within it, add a String key with the complete path to your MyAssemblyFolder.

I've created a tool which is completely free, 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.

Regards,

Muse VSExtensions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!