85

'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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ramón García-Pérez
  • 1,880
  • 2
  • 20
  • 25

3 Answers3

86

Microsoft Common Object Runtime Library.

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

Community
  • 1
  • 1
Mark Cidade
  • 98,437
  • 31
  • 224
  • 236
44

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 was an acronym for Microsoft Common Object Runtime Library. Once ECMA started to standardize the CLR and parts of the FCL, MSCorLib.dll officially became the acronym 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.

Bryan
  • 11,398
  • 3
  • 53
  • 78
  • personally I'd express it in the singular ("Library"), but that indeed describes the intent – Marc Gravell Feb 25 '13 at 07:27
  • 4
    Clarification on COOL - it stands for "C-like Object Oriented Language" and was the working name for C# (not the .NET framework); they couldn't use the name COOL due to trademark reasons hence the change to "C#". – Andrew Trevers Aug 14 '14 at 14:29
  • 2
    I actually think this should be the accepted answer, since it was not only posted first, it's also the most correct. Microsoft re-branded mscorlib so the "ms" now stands for "Multilanguage Standard" rather than "Microsoft". This is the only answer that actually gives the correct current name in addition to the original name. For a more official source, see http://www.microsoft.com/mspress/books/index/5353a.aspx, which shows that a book published by Microsoft Press gave this as the official name as far back as 2002. – Adi Inbar Nov 16 '14 at 21:53
  • 2
    "I never heard it called "COR", which is a silly-sounding name to a native English speaker." - what are you saying here? COR standing for common object runtime seems reasonable to me, – danio May 05 '15 at 15:17
  • 1
    The name COOL was indeed the language that was renamed to C# after Steve Ballmer and his companions on the golf course had an epiphany one day, essentially because the common English word "cool" couldn't be trademarked. The compiler was coolc.exe, before it was renamed to csc.exe. In any event, COOL was not the name of .NET, it was the name of what became the C# programming language, and COR was the common object runtime. – Craig Tullis Mar 27 '22 at 05:33
37

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:

 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 

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 use the 2.0 mscorlib at runtime (due to hard-coded version redirects in theruntime itself)
  • In GAC there is only one version of mscorlib, you dont find 1.1 version on GAC even if you have 1.1 framework installed on your machine. It would be good if somebody can explain why MSCorlib 2.0 alone is in GAC whereas 1.x version live inside framework folder
  • Is it possible to force a different runtime to be loaded by the application by making a config setting in your app / web.config? you won’t be able to choose the CLR version by settings in the ConfigurationFile – at that point, a CLR will already be running, and there can only be one per process. Immediately after the CLR is chosen the MSCorlib appropriate for that CLR is loaded.
One Man Crew
  • 9,420
  • 2
  • 42
  • 51
  • 8
    "It contains the following namespaces" - that depends hugely on which version you use (i.e. which target platform). It is not *required* to have very much at all. – Marc Gravell Feb 25 '13 at 08:21
  • “mscorlib” is an abbreviation for Multi-language Standard Common Object Runtime Library ( C# 6.0 in a Nutshell - The Definitive Reference (page 199)) – Code Pope Mar 05 '19 at 08:52