.net-core Understanding System.Runtime vs. mscorlib

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!


Every .NET library and programming language utilize a set of elementary data types like System.Int32, System.Object, System.Type or System.Uri. These data types form the base of all other structures including all custom written .NET libraries. All these types are hosted in a base library, which is either mscorlib or System.Runtime.

The libraries which can be used with .NET Core are based on System.Runtime core library while for the .NET Framework (the Windows component) they are based on mscorlib. This essential difference lead to...

  • the incompatibility of older libraries since they expect a type System.Object, mscorlib while a .NET Core library would expect System.Object, System.Runtime.
  • a type forwarding facade library called System.Runtime to the mscorlib in the .NET Framework. This library is otherwise (nearly) empty but enables the usage of System.Runtime based PCL libraries on the .NET Framework.
  • a type forwarding mscorlib to the System.Runtime in a future version of .NET Core.
  • the introduction of the portable class library concept (PCL) and as a second generation the netstandard as a method of unification between the two core libraries.

AND out of that, countless questions on Stack Overflow.

Got any .net-core Question?