什么是GAC在.NET? [英] What is the GAC in .NET?

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

问题描述

只是在寻找GAC的简短概述一个门外汉,而不是一个链接,请。

Just looking for a short overview of GAC for a layman, not a link please.

推荐答案

右,所以基本上这是一个方法来保持DLL文件,而不用担心冲突全局访问。没有更多的DLL地狱。每个架构和版本得到它自己居住的地方。

Right, so basically it's a way to keep DLLs globally accessible without worrying about conflicts. No more DLL Hell. Each architecture and version gets it's own place to live.

这也得到它自己的方式来浏览它在资源管理器中,所以如果你去

It also gets it own way to browse it in Explorer, so if you go to

C:\ WINDOWS \组装

C:\Windows\assembly

在Windows资源管理器会列出所有的DLL。

In windows explorer it lists all the DLLs.

但如果你火了 CMD ,你可以看到它的真正结构:

But if you fire up cmd, you can see how it's really structured:


C:\Users\tritter>cd C:\Windows\assembly

C:\Windows\assembly>dir

 Directory of C:\Windows\assembly

07/20/2009  02:18 PM    <DIR>          GAC
06/17/2009  04:22 PM    <DIR>          GAC_32
06/17/2009  04:22 PM    <DIR>          GAC_64
06/17/2009  04:22 PM    <DIR>          GAC_MSIL
 ...snip...
               0 File(s)              0 bytes
               9 Dir(s)  90,538,311,680 bytes free

C:\Windows\assembly>cd GAC_64

C:\Windows\assembly\GAC_64>dir

 Directory of C:\Windows\assembly\GAC_64

06/17/2009  04:22 PM    <DIR>          .
06/17/2009  04:22 PM    <DIR>          ..
01/19/2008  09:54 AM    <DIR>          blbproxy
 ...snip...
01/19/2008  09:54 AM    <DIR>          srmlib
01/19/2008  06:11 AM    <DIR>          System.Data
01/19/2008  06:11 AM    <DIR>          System.Data.OracleClient
 ...snip...
               0 File(s)              0 bytes
              34 Dir(s)  90,538,311,680 bytes free

C:\Windows\assembly\GAC_64>cd System.Data

C:\Windows\assembly\GAC_64\System.Data>dir
 Directory of C:\Windows\assembly\GAC_64\System.Data

01/19/2008  06:11 AM    <DIR>          .
01/19/2008  06:11 AM    <DIR>          ..
04/11/2009  12:20 PM    <DIR>          2.0.0.0__b77a5c561934e089
               0 File(s)              0 bytes
               3 Dir(s)  90,538,311,680 bytes free

C:\Windows\assembly\GAC_64\System.Data>cd 2.0.0.0__b77a5c561934e089

C:\Windows\assembly\GAC_64\System.Data\2.0.0.0__b77a5c561934e089>dir

 Directory of C:\Windows\assembly\GAC_64\System.Data\2.0.0.0__b77a5c561934e089

04/11/2009  12:20 PM    <DIR>          .
04/11/2009  12:20 PM    <DIR>          ..
04/11/2009  12:12 PM         3,008,512 System.Data.dll
               1 File(s)      3,008,512 bytes
               2 Dir(s)  90,538,311,680 bytes free

C:\Windows\assembly\GAC_64\System.Data\2.0.0.0__b77a5c561934e089>

在这里,您可以看到System.Data这对2.0.0.0__b77a5c561934e089版本。

Here you can see version 2.0.0.0__b77a5c561934e089 of System.Data.

一个DLL由5个部分确定:

A DLL is identified by 5 parts:

  1. 名称
  2. 版本
  3. 建筑
  4. 文化
  5. 公钥

尽管第3一般是大的。

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

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