GAC - 要将一个程序集添加到GAC中,拖放作品,但复制和粘贴不是?为什么? [英] GAC - To add an assembly to the GAC, drag and drop works, but copy and paste doesn't? Why?

查看:153
本文介绍了GAC - 要将一个程序集添加到GAC中,拖放作品,但复制和粘贴不是?为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道为什么拖放工作,并且复制粘贴没有。发生什么事情,拖放并没有发生在复制和粘贴?

解决方案

当你拖放你的汇编成 C:\windows\assembly 文件夹,它没有真正复制到这里 - 一个特殊的Windows资源管理器插件callis gacutil 安装您的程序集进入GAC。



这个Explorer插件可能会令人困惑,因为它可能会给人一种错觉,GAC只是简单的简单文件夹,带有大量的DLL。 实际上,它是一个层次结构,每个程序集名称都有一个文件夹,其中有不同版本的文件夹,等等。



如果要查看真实 GAC结构,请在Windows注册表中打开 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion 并设置DWORD DisableCacheViewer 1 。这将禁用高速缓存查看器插件,使GAC看起来很简单(但它也将拖放安装不可用 - 您必须自己调用 gacutil )。当然,您也可以使用替代文件管理器或控制台,如果您不想混淆注册表设置。



关于复制粘贴的原因没有工作,我相信任何设计Cache Viewer插件的人都认为拖放是一个很好的比喻,用于在GAC中放置某些东西,而实施复制和粘贴则会使GAC看起来像一个正常的文件夹 - 哪个不是 。


I would like to know why drag and drop works, and copy paste doesn't. What is happening with a drag and drop that isn't happening with a copy and paste?

解决方案

When you drag and drop your assembly into C:\windows\assembly folder, it doesn't really get copied there—a special Windows Explorer plugin callis gacutil to install your assembly into GAC.

This Explorer plugin can be confusing because it may give one an illusion that GAC is just plain simple folder with lots of DLLs. Actually, it is a hierarchical structure with a folder for each assembly name, inside of which there are folders for different versions, and so on.

If you want to see the real GAC structure, open HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion in Windows Registry and set DWORD DisableCacheViewer to 1. This will disable Cache Viewer plugin that makes GAC look so simple (but it also will make drag and drop to install unusable—you'll have to call gacutil yourself). Of course, you can use alternative file managers or console as well, if you don't want to mess with registry settings.

As for the reasons why copy-pasting does not work, I believe whoever designed Cache Viewer plugin thought that drag and drop is a good metaphor for putting something in GAC, whereas implementing copying and pasting would really make GAC seem like a normal folder—which it is not.

这篇关于GAC - 要将一个程序集添加到GAC中,拖放作品,但复制和粘贴不是?为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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