【发布时间】:2013-02-25 07:25:18
【问题描述】:
mscorlib 绝对是 .net 基类库之一,C# 中的每个程序都依赖它,但它代表什么?
在C# Language Specification 的 ECMA 标准中,该词被提及 4 次,但均未提及其含义。
【问题讨论】:
-
猜测微软核心库...
mscorlib 绝对是 .net 基类库之一,C# 中的每个程序都依赖它,但它代表什么?
在C# Language Specification 的 ECMA 标准中,该词被提及 4 次,但均未提及其含义。
【问题讨论】:
Microsoft Common Object Runtime 图书馆。
见http://www.danielmoth.com/Blog/mscorlibdll.aspx和What does 'Cor' stand for?
【讨论】:
Microsoft 核心库,即它们是一切的核心。
您可能更喜欢“按摩”的解释:
“当微软第一次开始开发 .NET Framework 时,MSCorLib.dll 是 Microsoft 公共对象运行时库的首字母缩写词。一旦 ECMA 开始 标准化CLR和部分FCL,MSCorLib.dll正式成为 多语言标准公共对象运行时库的首字母缩写词。”
来自http://weblogs.asp.net/mreynolds/archive/2004/01/31/65551.aspx
在我个人的记忆中,1999 年左右,.Net 被称为“COOL”,所以我对这个派生有点怀疑。我从来没有听说过它叫做“COR”,对于一个以英语为母语的人来说,这是一个听起来很傻的名字。
【讨论】:
它代表
微软的通用对象运行库
它是框架公共库的主要程序集。
它包含以下命名空间:
System
System.Collections
System.Configuration.Assemblies
System.Diagnostics
System.Diagnostics.SymbolStore
System.Globalization
System.IO
System.IO.IsolatedStorage
System.Reflection
System.Reflection.Emit
System.Resources
System.Runtime.CompilerServices
System.Runtime.InteropServices
System.Runtime.InteropServices.Expando
System.Runtime.Remoting
System.Runtime.Remoting.Activation
System.Runtime.Remoting.Channels
System.Runtime.Remoting.Contexts
System.Runtime.Remoting.Lifetime
System.Runtime.Remoting.Messaging
System.Runtime.Remoting.Metadata
System.Runtime.Remoting.Metadata.W3cXsd2001
System.Runtime.Remoting.Proxies
System.Runtime.Remoting.Services
System.Runtime.Serialization
System.Runtime.Serialization.Formatters
System.Runtime.Serialization.Formatters.Binary
System.Security
System.Security.Cryptography
System.Security.Cryptography.X509Certificates
System.Security.Permissions
System.Security.Policy
System.Security.Principal
System.Text
System.Threading
Microsoft.Win32
有关 MSCorlib 的有趣信息:
.NET 1.1 程序集将引用 1.1 mscorlib 但将使用
运行时的 2.0 mscorlib(由于硬编码版本重定向
运行时本身)MSCorlib 2.0就好了
单独在 GAC 中,而 1.x 版本位于框架文件夹中【讨论】: