GAC、gacutil.exe 和程序集缓存查看器
我是 .NET 新手,有几个关于 GAC 的简单问题。
首先,据我了解 .NET 3.5 中的 GAC 与 .net 4.0 中的 GAC 不同。
我还知道有两个主要工具用于管理 GAC:gacutil 和集成在 Windows 资源管理器中的 Assembly Cache Viewer。所以我的问题如下:
- 为什么 Assembly Cache Viewer 在 .NET 4.0 中已过时?
- 我已经安装了 .NET 4.0,并且必须安装 GAC。如何告诉 gacutil.exe 仅针对其中一个 GAC?
- 我猜两个 GAC 中有很多重复的程序集,对吗?
先感谢您
I'm new to .NET and I have few simple questions regarding the GAC.
First of all, as far as I understand the GAC in .NET 3.5 is different from the GAC in .net 4.0 .
I also know that there are two main tools for managing the GAC : gacutil and Assembly Cache Viewer which is integrated in Windows Explorer. So my questions are the following :
- Why is Assembly Cache Viewer obsolete in .NET 4.0 ?
- I have installed .NET 4.0 and I have to GACs. How to tell gacutil.exe to target only one of the GACs ?
- I guess there are many duplicate assemblies in the two GACs am I right ?
Thank you in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您有一个用于 .Net 2.0 运行时的 GAC 和一个单独的用于 .Net 4.0 运行时的 GAC。
同样,gacutil.exe 有两个版本,每个运行时一个版本。
每一项只会影响其 GAC。
通常,不存在重复的程序集; .Net 2.0 GAC 包含 .Net 2.0 程序集,.Net 4.0 GAC 包含 .Net 4.0 程序集。
但是,可以将 smae .Net 2.0 程序集添加到两个 GAC 中。 (通过运行两个 gacutils)
You have one GAC for the .Net 2.0 runtime and a separate GAC for the .Net 4.0 runtime.
Similarly, there are two versions of gacutil.exe, one for each runtime.
Each one will only affect its GAC.
Ordinarily, there are no duplicate assemblies; the .Net 2.0 GAC contains .Net 2.0 assemblies and the .Net 4.0 GAC contains .Net 4.0 assemblies.
However, it is possible to add the smae .Net 2.0 assembly to both GACs. (by running both gacutils)