哪里是我的GAC在什么位置? [英] Where is my GAC located?

查看:1608
本文介绍了哪里是我的GAC在什么位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想成为更熟悉.NET全局程序集缓存。各种消息来源说,在网上就可以在资源管理器中找到C:\ WINNT \大会。但我似乎没有有在C一WINNT文件夹:在我的Windows XP机器。我有显示隐藏文件和文件夹检查和隐藏受保护的操作系统文件联合国检查。

I wanted to become more familiar with the .Net Global Assembly Cache. Various sources online say it can be found in Explorer in C:\WINNT\Assembly. But I don't seem to have a WINNT folder under C: on my Windows XP machine. I have "Show Hidden Files and Folders" checked and "Hide Protected Operating System Files" UN-checked.

使用在<一个描述的方法href="http://stackoverflow.com/questions/199080/how-to-detect-what-net-framework-versions-and-service-packs-are-installed">How来检测一下.NET框架版本和服务包安装?,特别是在的 http://msdn.microsoft.com/en-us/kb/kbarticle.aspx?id=318785 我看到我了.NET 4.0安装。

Using the methods described in How to detect what .NET Framework versions and service packs are installed? and especially in http://msdn.microsoft.com/en-us/kb/kbarticle.aspx?id=318785 I see that I have .Net 4.0 installed.

我如何能够可靠地找到它,为什么会是任何地方,但它应该是?

How can I reliably find it and why would it be anywhere but where it's supposed to be?

推荐答案

作为一个声明,我要开始说,你不应该直接编辑您的GAC的内容。

As a disclaimer, I'm going to start by saying that you should never directly edit the contents of your GAC.

到信息...

有两种不同的GAC在游戏中你的问题,2.0 GAC和4.0 GAC。在谈到这些,他们没有那么多指的是.NET Framework的版本,这么多正在使用的CLR的版本。它只是恰巧,在2.0中,CLR是2,而在4.0中,CLR是4。作为一个参照系,在CLR对于.NET 3.5停留在2,因此,GAC对.NET 2.0和.NET 3.5是相同的。

There are two different GAC's in play in your question, the 2.0 GAC and the 4.0 GAC. When talking about these, they aren't so much referring to the version of the .NET framework, so much as the version of the CLR being used. It just so happens that in 2.0, the CLR is 2, and in 4.0, the CLR is 4. As a frame of reference, the CLR for .Net 3.5 stayed at 2, and hence the GAC for .net 2.0 and .net 3.5 is the same.

但是又在哪里呢?

2.0 GAC是在资源管理器中%WINDIR%\大会。对于大多数较新的Windows操作系统的,%WINDIR%为C:\ WINDOWS默认情况下。引擎盖下,这实际上是一个外壳扩展隐藏GAC的真实位置,但对你而言,你打开资源管理器C:\ WINDOWS \大会查看2.0 GAC的内容。外壳扩展还增加了拖放组件到C的好处:(UAC必须在Win7及以上被禁用),以便将其添加到GAC \的Windows \大会

The 2.0 GAC is at %WINDIR%\Assembly in explorer. For most newer Windows OS's, %WINDIR% is C:\Windows by default. Under the hood, this is actually a shell extension hiding the real location of the GAC, but for your purposes, you open explorer to C:\Windows\Assembly to view the contents of the 2.0 GAC. The shell extension also adds the benefit of dragging and dropping assemblies into C:\Windows\Assembly in order to add them to the GAC (UAC must be disabled in Win7 and up.)

4.0 GAC是在C:\ WINDOWS \ Microsoft.NET \组装。你会发现不同类型的程序集文件夹下分成的32位,64位,或MSIL子目录。没有外壳扩展CLR4的GAC,所以你看在盘里的程序集居住的实际到位。

The 4.0 GAC is at C:\Windows\Microsoft.NET\assembly. You'll find the various types of assemblies divided up into their 32-bit, 64-bit, or MSIL subdirectories under that folder. There is no shell extension for CLR4's gac, so you're looking at the actual place on disk where the assemblies live.

有点偏离主题...

这是我一直编程方式检测安装了哪些.net框架版本的方法是看 HKEY_LOCAL_MACHINE \ SOFTWARE \微软\ NET Framework安装\新民主党 ...子文件夹指示安装的版本。

The way that I always programatically detect what versions of the .Net framework are installed is to look at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP ... the sub-folders indicate installed versions.

这篇关于哪里是我的GAC在什么位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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