中的程序集未显示在

中的程序集未显示在

本文介绍了安装到 GAC 中的程序集未显示在 Visual Studio 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这听起来与

这是我在 Visual Studio 中可用的程序集列表:

这是我安装它的命令提示符,然后确认:

C:UsersjasonDownloads>gacutil -i Rhino.Mocks.dllMicrosoft (R) .NET 全局程序集缓存实用程序.版本 4.0.21006.1版权所有 (c) 微软公司.版权所有.程序集已成功添加到缓存C:UsersjasonDownloads>gacutil/l |grep -i rhinoRhino.Mocks,版本=3.6.0.0,Culture=neutral,PublicKeyToken=0b3305902db7183f,processorArchitecture=MSIL
解决方案

Visual Studio 从不列出 GAC 中的所有项目.它仅列出在特定注册表项中注明的项目.

有关详细信息,请参阅此知识库文章:如何在添加引用"对话框中显示程序集盒子

您始终可以通过在磁盘上浏览到程序集来添加对程序集的引用.

This sounds related to this question, but they aren't the same thing. That question had no assemblies showing up. Mine has everything except the specific one I installed.

I'm hoping someone has a solution to this... am I doing something wrong? Or did I find some bug in VS?

I am using Visual Studio 2010 Professional Beta 2 on Windows 7 Ultimate. I just downloaded Rhino Mocks and decided to install it into the GAC using the command-line utility GACUTIL. I then rebooted.

Here you can see the assembly in my GAC (click to enlarge):

And here is the list of assemblies available to me in Visual Studio:

Here is the command prompt where I installed it, and then confirmed it:

C:UsersjasonDownloads>gacutil -i Rhino.Mocks.dll
Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.21006.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Assembly successfully added to the cache

C:UsersjasonDownloads>gacutil /l |grep -i rhino
Rhino.Mocks, Version=3.6.0.0, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL
解决方案

Visual Studio never lists all items in the GAC. It only lists items that are noted in a particular registry key.

Please see this knowledge base article for more info: How to display an assembly in the "Add Reference" dialog box

You can always add a reference to the assembly by browsing to it on disk.

这篇关于安装到 GAC 中的程序集未显示在 Visual Studio 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 05:56