Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
461 views
in Technique[技术] by (71.8m points)

Assembly installed into the GAC not showing up in Visual Studio

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):

alt text

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

alt text

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
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...