Why is my assembly not visible in “Add Reference > .Net” when installed to the GAC?

老子叫甜甜 提交于 2019-12-04 00:10:19
Justin

Your assembly is installed to C:\WINDOWS\Microsoft.NET\assembly\ instead of C:\Windows\Assembly\ because it is a .Net 4.0 assembly and the .Net framework version 4.0 has a new separate GAC in that location. The GAC located at C:\Windows\Assembly\ contains only .Net 2.0 - 3.5 assemblies. (see .NET 4.0 has a new GAC, why?).

The list of assemblies found in Visual Studios "Add Reference -> .Net." dialog is not simply a list of assemblies found in the GAC (notice that most of the entries in that list aren't found in the GAC either).

For information on how to add your assembly to this list see the following article (specifically the "To display an assembly in the Add Reference dialog box" section):

Note that the registry key used for this is different for different versions of Visual Studio.

BALKANGraph

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.

Hope this helps.

Check your project properties under vs2010 Project menu: i've seen this were the project is ".NET Framework 4 Client Profile" and the assembly is ".NET 4 Fraemwork". solution : Change the project to ".NET framework 4" profile

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