“添加引用"对话框中缺少GAC程序集 [英] GAC Assembly Missing in Add Reference dialog

查看:144
本文介绍了“添加引用"对话框中缺少GAC程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在GAC中有一个Interop组装件; Windows资源管理器将其清楚地显示在C:\WINDOWS\assembly文件夹中.但是,当我尝试从Visual Studio中添加对它的引用时,在添加引用"对话框的任何位置都看不到它.

I have an Interop assembly lying in GAC; Windows Explorer clearly shows it listed in the C:\WINDOWS\assembly folder. Yet, when I try to add a reference to it in from Visual Studio, I can't see it anywhere in the Add Reference dialog.

如果您也遇到这种情况,这是什么原因?以及我该如何解决?

If this is happened to you too, what is the reason for this? And how do I fix this?

(如果需要知道的话,程序集实际上位于C:\WINDOWS\assembly\GAC_MSIL文件夹中.)

(The assembly is actually located in C:\WINDOWS\assembly\GAC_MSIL folder, if you must know.)

推荐答案

添加以下注册表项之一,其中要搜索的目录是其中,而MyAssemblies是程序集的类别.注意HKCU适用于当前用户,HKLM适用于同一台计算机上的每个人.

Add one of the following registry keys, where is the directory to search, and MyAssemblies is the category of your assemblies. Note HKCU is for the current user and HKLM is for everyone on the same computer.

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework\<version>\AssemblyFoldersEx\MyAssemblies]@="<AssemblyLocation>"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\<version>\AssemblyFoldersEx\MyAssemblies]@="<AssemblyLocation>"

这篇关于“添加引用"对话框中缺少GAC程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆