Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
.NET Standard is a formal specification that defines a versioned set of APIs that must be available on .NET implementations that comply with that version of the standard. .NET Standard is targeted at library developers. A library that targets a .NET Standard version can be used on any .NET implementation that supports that version of the standard.
.NET Standard is included with the .NET SDK. It's also included with Visual Studio if you select the .NET workload.
.NET Standard 2.1 is the last version of .NET Standard that will be released. For more information, see .NET 5+ and .NET Standard.
.NET Standard 2.1 is supported by the following .NET implementations:
.NET Standard 2.0 is supported by the following .NET implementations:
.NET Standard 2.1 adds many APIs to the standard. Some of them are new APIs, and others are existing APIs that help to converge the .NET implementations even further. For a list of the APIs that have been added to .NET Standard 2.1, see .NET Standard 2.1 vs 2.0.
For more information, see the Announcing .NET Standard 2.1 blog post.
.NET Standard 2.0 includes the following new features.
Through version 1.6, .NET Standard included a comparatively small subset of APIs. Among those excluded were many APIs that were commonly used in .NET Framework. This complicates development, since it requires that developers find suitable replacements for familiar APIs when they develop applications and libraries that target multiple .NET implementations. .NET Standard 2.0 addresses this limitation by adding over 20,000 more APIs than were available in the previous version of the standard, .NET Standard 1.6. For a list of the APIs that have been added to .NET Standard 2.0, see .NET Standard 2.0 vs 1.6.
Some of the additions to the System namespace in .NET Standard 2.0 include:
Many libraries target .NET Framework rather than .NET Standard. However, most of the calls in those libraries are to APIs that are included in .NET Standard 2.0. Starting with .NET Standard 2.0, you can access .NET Framework libraries from a .NET Standard library by using a compatibility shim. This compatibility layer is transparent to developers; you don't have to do anything to take advantage of .NET Framework libraries.
The single requirement is that the APIs called by the .NET Framework class library must be included in .NET Standard 2.0.
You can now develop .NET Standard libraries in Visual Basic. Visual Studio 2019 and Visual Studio 2017 version 15.3 or later with the .NET Core workload installed include a .NET Standard Class Library template. For Visual Basic developers who use other development tools and environments, you can use the dotnet new command to create a .NET Standard Library project. For more information, see the Tooling support for .NET Standard libraries.
With the release of .NET Core 2.0 and .NET Standard 2.0, both Visual Studio 2017 and the .NET CLI include tooling support for creating .NET Standard libraries.
If you install Visual Studio with the .NET Core cross-platform development workload, you can create a .NET Standard 2.0 library project by using a project template, as the following figure shows:
If you're using the .NET CLI, the following dotnet new command creates a class library project that targets .NET Standard 2.0:
dotnet new classlib
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Introduction to .NET - Training
Start learning about .NET. Understand what .NET is and how it works. Quickly build a small app in a web-based .NET environment.
Documentation
Learn about .NET 5, a cross-platform and open-source development platform that is the next evolution of .NET Core.
What's new in .NET Core 3.1 - .NET
Learn about the new features found in .NET Core 3.1.
Learn about the new features introduced in .NET 6.