What is .NET Standard
PRATIK KHASNABIS
@SOFTVEDA
DDD BY NIGHT 2017
Flavours of .Net
.Net Standard
.NET FRAMEWORK .NET CORE XAMARIN
APP
MODELS
BASE
LIBRARIES
Compilers Languages Runtime components
COMMON INFRASTRUCTURE
Interface vs Realisation
.Net Standard
.Net
Framework
4.6.1
.Net Core 1.1 Xamarin
Future
Platforms
(UWP, Tizen)
PCL vs .Net Standard
.Net 4.0
SL 5.0
Windows
8.0
.Net
Standard
2.0
Profile5
Profile14
Profile47
.Net Core 2.0
Xamarin
.Net 4.7
UWP
.Net Platform Support
.NET Standard 1.0 1.1 1.2 1.3 1.4 1.5 1.6 2.0
.NET Core 1.0 1.0 1.0 1.0 1.0 1.0 1.0 2.0
.NET Framework (with
tooling 1.0)
4.5 4.5 4.5.1 4.6 4.6.1 4.6.2
.NET Framework (with
tooling 2.0 preview)
4.5 4.5 4.5.1 4.6 4.6.1 4.6.1 4.6.1 4.6.1
Mono 4.6 4.6 4.6 4.6 4.6 4.6 4.6 vNext
Xamarin.iOS 10.0 10.0 10.0 10.0 10.0 10.0 10.0 vNext
Xamarin.Android 7.0 7.0 7.0 7.0 7.0 7.0 7.0 vNext
Universal Windows
Platform
10.0 10.0 10.0 10.0 10.0 vNext vNext vNext
Windows 8.0 8.0 8.1
Windows Phone 8.1 8.1 8.1
Windows Phone
Silverlight
8.0
Versions
More APIs
More Platforms
Version
Target the lowest version of .NET Standard possible
1.0
1.1
1.2 .. 1.6
2.0
Improvements with .NET Standard 2.0
Api Browsing
Under the Hoods – Compile TIME
Your .Net Standard
Class Library
NetStandard.dllReference
C:Users<xxx>.nugetpackagesnetstandard.library2.0.0-preview2-25401-
01buildnetstandard2.0ref
No method
implementation,
satisfies compiler
Telerik just decompiler
Under the Hoods – Run TIME
Your .Net 4.6.1
application
.Net 4.6.1 BCL
assemblies
Reference
C:Program
Filesdotnetsdk2.0.0-
preview2-
006497MicrosoftMicrosoft.N
ET.Build.Extensionsnet461lib
netstandard.dll
Your .Net Standard
Class Library
Reference
NetStandard.dll
(.net framework)
Reference
Type Forwarding
https://t.co/mvEFI1EILe
Links
https://github.com/dotnet/standard

What is .Net Standard

  • 1.
    What is .NETStandard PRATIK KHASNABIS @SOFTVEDA DDD BY NIGHT 2017
  • 2.
  • 3.
    .Net Standard .NET FRAMEWORK.NET CORE XAMARIN APP MODELS BASE LIBRARIES Compilers Languages Runtime components COMMON INFRASTRUCTURE
  • 4.
    Interface vs Realisation .NetStandard .Net Framework 4.6.1 .Net Core 1.1 Xamarin Future Platforms (UWP, Tizen)
  • 5.
    PCL vs .NetStandard .Net 4.0 SL 5.0 Windows 8.0 .Net Standard 2.0 Profile5 Profile14 Profile47 .Net Core 2.0 Xamarin .Net 4.7 UWP
  • 6.
    .Net Platform Support .NETStandard 1.0 1.1 1.2 1.3 1.4 1.5 1.6 2.0 .NET Core 1.0 1.0 1.0 1.0 1.0 1.0 1.0 2.0 .NET Framework (with tooling 1.0) 4.5 4.5 4.5.1 4.6 4.6.1 4.6.2 .NET Framework (with tooling 2.0 preview) 4.5 4.5 4.5.1 4.6 4.6.1 4.6.1 4.6.1 4.6.1 Mono 4.6 4.6 4.6 4.6 4.6 4.6 4.6 vNext Xamarin.iOS 10.0 10.0 10.0 10.0 10.0 10.0 10.0 vNext Xamarin.Android 7.0 7.0 7.0 7.0 7.0 7.0 7.0 vNext Universal Windows Platform 10.0 10.0 10.0 10.0 10.0 vNext vNext vNext Windows 8.0 8.0 8.1 Windows Phone 8.1 8.1 8.1 Windows Phone Silverlight 8.0
  • 7.
    Versions More APIs More Platforms Version Targetthe lowest version of .NET Standard possible 1.0 1.1 1.2 .. 1.6 2.0
  • 8.
  • 9.
  • 10.
    Under the Hoods– Compile TIME Your .Net Standard Class Library NetStandard.dllReference C:Users<xxx>.nugetpackagesnetstandard.library2.0.0-preview2-25401- 01buildnetstandard2.0ref No method implementation, satisfies compiler Telerik just decompiler
  • 11.
    Under the Hoods– Run TIME Your .Net 4.6.1 application .Net 4.6.1 BCL assemblies Reference C:Program Filesdotnetsdk2.0.0- preview2- 006497MicrosoftMicrosoft.N ET.Build.Extensionsnet461lib netstandard.dll Your .Net Standard Class Library Reference NetStandard.dll (.net framework) Reference Type Forwarding
  • 12.

Editor's Notes

  • #5 The objects and methods of frameworks are called Application Programming Interfaces (APIs).
  • #6 https://portablelibraryprofiles.stephencleary.com/
  • #7 https://docs.microsoft.com/en-us/dotnet/standard/library
  • #8 .NET Standard can be thought of as the next generation of Portable Class Libraries (PCL). https://portablelibraryprofiles.stephencleary.com/
  • #9 Each newer version of .NET Standard adds more APIs but leaves older platforms/operating systems behind. higher versions incorporate all APIs from previous versions. There are no breaking changes between versions. Immutable. Once shipped, .NET Standard versions are frozen.
  • #10 https://blogs.msdn.microsoft.com/dotnet/2017/05/10/announcing-net-core-2-0-preview-1/
  • #11 https://docs.microsoft.com/en-us/dotnet/api/?view=netstandard-2.0 https://apisof.net/catalog/System.Data.DataSet