'mscorlib' is definitely one of .NET base class libraries and every program in C# depends on it, but what does it stand for?

In the ECMA standard for the C# Language Specification, the word is mentioned four times and none of them are referring to what it means.

3

Best Answer


Microsoft Common Object Runtime Library.

See http://www.danielmoth.com/Blog/mscorlibdll.aspx and What does 'Cor' stand for?

Microsoft Core Library, ie they are at the heart of everything.

There is a more "massaged" explanation you may prefer:

"When Microsoft first started working on the .NET Framework, MSCorLib.dll wasan acronym for Microsoft Common Object Runtime Library. Once ECMA started tostandardize the CLR and parts of the FCL, MSCorLib.dll officially became theacronym for Multilanguage Standard Common Object Runtime Library."

From http://weblogs.asp.net/mreynolds/archive/2004/01/31/65551.aspx

Around 1999, to my personal memory, .Net was known as "COOL", so I am a little suspicious of this derivation. I never heard it called "COR", which is a silly-sounding name to a native English speaker.

It stands for

Microsoft's Common Object Runtime Library

and it is the primary assembly for the Framework Common Library.

It contains the following namespaces:

 SystemSystem.CollectionsSystem.Configuration.AssembliesSystem.DiagnosticsSystem.Diagnostics.SymbolStoreSystem.GlobalizationSystem.IOSystem.IO.IsolatedStorageSystem.ReflectionSystem.Reflection.EmitSystem.ResourcesSystem.Runtime.CompilerServicesSystem.Runtime.InteropServicesSystem.Runtime.InteropServices.ExpandoSystem.Runtime.RemotingSystem.Runtime.Remoting.ActivationSystem.Runtime.Remoting.ChannelsSystem.Runtime.Remoting.ContextsSystem.Runtime.Remoting.LifetimeSystem.Runtime.Remoting.MessagingSystem.Runtime.Remoting.MetadataSystem.Runtime.Remoting.Metadata.W3cXsd2001System.Runtime.Remoting.ProxiesSystem.Runtime.Remoting.ServicesSystem.Runtime.SerializationSystem.Runtime.Serialization.FormattersSystem.Runtime.Serialization.Formatters.BinarySystem.SecuritySystem.Security.CryptographySystem.Security.Cryptography.X509CertificatesSystem.Security.PermissionsSystem.Security.PolicySystem.Security.PrincipalSystem.TextSystem.ThreadingMicrosoft.Win32 

Interesting info about MSCorlib:

  • The .NET 2.0 assembly will reference and use the 2.0 mscorlib.The.NET 1.1 assembly will reference the 1.1 mscorlib but will usethe 2.0 mscorlib at runtime (due to hard-coded version redirects intheruntime itself)
  • In GAC there is only one version of mscorlib, you dont find 1.1version on GAC even if you have 1.1 framework installed on yourmachine. It would be good if somebody can explain why MSCorlib 2.0alone is in GAC whereas 1.x version live inside framework folder
  • Is it possible to force a different runtime to be loaded by theapplication by making a config setting in your app / web.config? youwon’t be able to choose the CLR version by settings in theConfigurationFile – at that point, a CLR will already be running, andthere can only be one per process. Immediately after the CLR ischosen the MSCorlib appropriate for that CLR is loaded.