GAC - 为了一个程序集添加到GAC,拖放作品,但复制和粘贴不?为什么?拖放、程序、作品、GAC

2023-09-03 10:30:41 作者:闪现到哥哥怀里

我想知道为什么拖放工作,并复制粘贴不。这是怎么回事用拖放未发生有复制和粘贴?

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?

推荐答案

在拖放组装成 C:\ WINDOWS \组装文件夹,它不真的被复制那里,一个特殊的Windows资源管理器插件卡利斯 GACUTIL 您的程序集安装到GAC。

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.

这资源管理器插件可能会造成混淆,因为它可能会给之一的错觉,GAC就是有很多的DLL朴素简单的文件夹。 其实,这是一种层次结构,一个文件夹,每个程序集的名称,这里面有不同版本的文件夹,等等。

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.

如果你想看到的真正的GAC结构,打开 HKEY_LOCAL_MACHINE \ SOFTWARE \微软\融合在Windows注册表中,并设置DWORD DisableCacheViewer 1 。这将禁用缓存查看器插件,使GAC看起来那么简单(但也会使拖放安装无法使用 - 你得叫 GACUTIL 自己)。当然,你可以使用其他的文件管理器或控制台为好,如果你不想惹注册表设置。

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.

至于为何复制粘贴不工作,我相信不管是谁设计的高速缓存查看器插件认为拖放是一个很好的比喻的将的东西在GAC,而执行复制和粘贴将真正使广汽看起来像一个正常的文件夹,其中的不是的

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.