Chapter 3 Shared Assemblies and Strongly Named Assemblies
As time marches on,MS developers and control developer modify their code:they fix bugs,patch security flaws,add features,and so on,whick contributes to the instability of windows
The CLR supports two kinds of assemblies:weakly named assemblies and strongly named assemblies.
Weakly named assemblies and strongly named assemblies structurally identical-taht is,they user the same portable executble file fomat,PE32(+)header,CLR header,metadata,manifest tables,and IL.
The real difference between weakly named and stongly named assemblies is that a strongly named assembly is signed with a publisher's public/private key pair that uniquely identifies the assembly's publicsher.the key paie allows the assembly to be uniquely identified,secured,and versioned,and it allows the assembly to be deployed andwhere on the user'smachine or even on the internet,this ability to uniquely identify an assembly allows the clR to enforce certain kenow-to-be-safe pilicies when an application tries to bind to astrongly name assemblies are and what plicies the CLR applies to them.
It is highly recommended that you strongly name all of your assemblies. In fact, it is likely that future versions of the CLR will require all assemblies to be strongly named, and the ability to create weakly named assemblies will be deprecated. Weakly named assemblies are a problem
because it is possible to have several different assemblies all with the same weak name. On the other hand, giving an assembly a strong name uniquely identifies that assembly. If the CLR can uniquely identify an assembly, it can apply more policies to it related to versioning or backward
compatibility. It is Microsoft’s plan to endow future versions of the CLR with these policies to make versioning simpler. In fact, just eliminating the ability to make weakly named assemblies makes understanding the CLR’s versioning policies simpler.
Obviously, differentiating assemblies simply by using a file name isn’t good enough. The CLR needs to support some mechanism that allows assemblies to be uniquely identified. This is what the term strongly named assembly refers to. A strongly named assembly consists of four
attributes that uniquely identify the assembly: a file name (without an extension), a version number, a culture identity, and a public key. Since public keys are very large numbers, we frequently use a small hash value derived from a public key. This hash value is called a public key
token. The following assembly identity strings (sometimes called an assembly display name) identify four completely different assembly files:
"MyTypes, Version=1.0.8123.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
"MyTypes, Version=1.0.8123.0, Culture="en-US", PublicKeyToken=b77a5c561934e089"
"MyTypes, Version=2.0.1234.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
"MyTypes, Version=1.0.8123.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
The first string identifies an assembly file called MyTypes.exe or MyTypes.dll (you can’t actually determine the file extension from an assembly identity string). The company producing the assembly is creating version 1.0.8123.0 of this assembly, and nothing in the assembly is sensitive
to any one culture because Culture is set to neutral. Of course, any company could produce a MyTypes.dll (or MyTypes.exe) assembly file that is marked with a version number of 1.0.8123.0 and a neutral culture.
In my workplace,wo don't useing this type frequent,so not understand clear
Chapter 3 Shared Assemblies and Strongly Named Assemblies的更多相关文章
- CLR via C# 3rd - 03 - Shared Assemblies and Strongly Named Assemblies
1. Weakly Named Assembly vs Strong Named Assembly Weakly named assemblies and strongly named ...
- Shared Assembilies and Strongly Named Assemblies
the .NET Framework has in place to deal with versioning problems. Two Kinds of Assemblies, Two Kinds ...
- .NET:CLR via C# Shared Assemblies and Strongly Named Assemblies
Two Kinds of Assemblies, Two Kinds of Deployment A strongly named assembly consists of four attribut ...
- .Net中DLL冲突解决(真假美猴王)
<西游记>中真假美猴王让人着实难以区分,但是我们熟知了其中的细节也不难把他们剥去表象分别出来.对问题不太关心的可以直接调到文中关于.Net文件版本的介绍 问题 最近在编译AKKA.net ...
- NET Framework GAC目录构造
转:http://www.yl1001.com/userzone.htm?doaction=article&art_id=5851381388387201 我们一般都知道,.NET Frame ...
- error——Fusion log——Debugging Assembly Loading Failures
原文 So...you're seeing a FileNotFoundException, FileLoadException, BadImageFormatException or you sus ...
- Think Python - Chapter 17 - Classes and methods
17.1 Object-oriented featuresPython is an object-oriented programming language, which means that it ...
- Position Independent Code (PIC) in shared libraries
E原文地址:http://eli.thegreenplace.net/2011/11/03/position-independent-code-pic-in-shared-libraries/下一文: ...
- Known BREAKING CHANGES from NH3.3.3.GA to 4.0.0
Build 4.0.0.Alpha1 ============================= ** Known BREAKING CHANGES from NH3.3.3.GA to 4.0. ...
随机推荐
- 第3章 CentOS常用命令
一.CentOS常用命令 1.1 文件和目录 # cd /home 进入 '/home' 目录 # cd .. ...
- angular http ajax header
myAppModule.config(['$httpProvider', function($httpProvider) { $httpProvider.defaults.headers.common ...
- Unable to connect to the MKS : Failed to connect to server XXXXXX:903
Issue : 通过 vSphere 连接VM控制台的时候, 报错 Unable to connect to the MKS : Failed to connect to server X ...
- npm、yarn、pnpm
它们都是当前主流的包管理工具 pnpm:https://github.com/pnpm/pnpm yarn: https://github.com/yarnpkg/yarn npm: https:// ...
- php.ini的载入位置
php.ini文件找不到,载入WINDOS下的,但找不到,后来强制-c查找是OK的.思考,为什么载入window下的ini文件.1.可能是有一个默认路径.2.可能没有路径.默认载入. 问题解决:htt ...
- 现成Android 5.0系统源代码
让Android融入我的生活! 写Android一段时间了,每次看到网上一些大牛的博客.分析Android底层Zygote启动.Activity启动.View的绘制过程.SurfaceFlinger. ...
- Spring Boot中使用RSocket
1. 概述 RSocket应用层协议支持 Reactive Streams语义, 例如:用RSocket作为HTTP的一种替代方案.在本教程中, 我们将看到RSocket用在spring boot中, ...
- ANDROID STUDIO 2.2.3 DOWNLOAD FROM DL.GOOGLE.COM
立即开始使用 Android Studio Android Studio 包含用于构建 Android 应用所需的所有工具. 下载 ANDROID STUDIO2.2.3 FOR WINDOWS (1 ...
- SecureCRT 7.0 如何自动记录日志
设置步骤如下: 1.打开SecureCRT ,在菜单里选择“选项”-->“全局选项” 2.然后选择“常规”--> “默认会话”--> “编辑默认设置” 3.然后选择“日志 ...
- 深入Garbage First垃圾收集器(三)G1中的垃圾收集
G1 GC在收集暂停的过程中会回收绝大部分堆分区,唯一的例外是多级并发标记期间的清除阶段. 在清除阶段,如果G1遇到仅仅只存放了垃圾的分区,它就会立刻收集这些分区并将它们放回空闲分区列表中,因此这些分 ...