News

.NET Standard 2.0 Is Finalized for Consistent API Usage

The open source .NET Standard 2.0 project was finalized today, providing a formal spec for .NET APIs that should be available to developers working with all .NET implementations.

With finalization, developers can now create .NET Standard 2.0 libraries and NuGet packages, Microsoft program manager Immo Landwerth announced in a GitHub issue.

The .NET Standard project for Visual Studio 2017, hosted on a GitHub site belonging to the .NET Foundation, was announced last September. Microsoft said .NET Standard will replace Portable Class Libraries (PCLs) as the de-facto tooling story used by developers for building multi-platform .NET libraries.

".NET Standard solves the code sharing problem for .NET developers across all platforms by bringing all the APIs that you expect and love across the environments that you need: desktop applications, mobile apps & games, and cloud services," Microsoft said in a huge blog post (with nearly 200 comments) explaining the standard in detail.

Apparently facing developer confusion about exactly what .NET Standard is for, Microsoft has devoted some guidance to explaining it, even pointing to an analogy written by David Fowler.

Furthermore, Microsoft explains the difference between the .NET Standard and .NET Core in a FAQ. "NET Standard is a specification that covers which APIs a .NET platform has to implement," it says. ".NET Core is a concrete .NET platform and implements the .NET Standard."

Other developers took a stab at describing it in a Hacker News post. "Conceptually, I think of it in terms of browsers and browser standards," said one commenter identifying as a Microsoft .NET team member. "The relationship between .NET Standard and the various .NET platforms (.NET Core, .NET Framework, Mono, Xamarin, UWP, etc.) is similar to HTML specifications (e.g. https://www.w3.org/TR/html5/) and individual browsers. Newer HTML features are available on newer browsers, and some browser feature implementation is contextualized (e.g. some web features don't make sense on a mobile phone browser)."

.NET Standard 2.0
[Click on image for larger view.] .NET Standard 2.0 (source: Microsoft).

The new version 2.0 standard introduces no breaking changes from the prior version 1.6, but Microsoft said it was given a major revision number because it's so different from the previous release. The number of differences is so great that the GitHub page created to detail those differences wouldn't display the list, saying the file was too big (the gigantic diff file can be viewed in raw format). The project FAQ said 2.0 more than doubled the API surface and added a compat shim that lets developers reference existing binaries, even if such binaries are not built against .NET Standard or PCLs.

In fact, Landwerth said in his post, the number of available APIs jumped from about 13,000 to 32,000. Regarding the .NET Framework compatibility mode, he said: "The vast majority of NuGet packages are currently still targeting .NET Framework. Many projects are currently blocked from moving to .NET Standard because not all their dependencies are targeting .NET Standard yet. That's why we added a compatibility mode that allows .NET Standard projects to depend on .NET Framework libraries as if they were compiled for .NET Standard.

"Of course, this may not work in all cases (for instance, if the .NET Framework binaries uses WPF), but we found that 70 percent of all NuGet packages on nuget.org are API compatible with .NET Standard 2.0, so in practice it unblocks many projects," he continued.

Visual Studio 2017 15.3 should be used to create .NET Standard 2.0 libraries.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Microsoft Highlights Visual Studio Live! Event Lineup and Longtime Developer Community Role

    A Microsoft MVP Blog post on Visual Studio Live!'s longevity arrives as the 2026 conference series continues with upcoming stops at Microsoft HQ, San Diego and Orlando.

  • Using Local AI to Cut Copilot Usage-Based Billing Shock

    After being gobsmacked by the new billing plan using almost all my monthly credits in one or two days, I tried pushing some Copilot-style coding work onto local models in VS Code. What I found was less "free AI" and more "pick your pain": cloud charges on one side, heavy local resource use and long waits on the other.

  • .NET 11 Preview 5 Focuses on Performance, Productivity and Safer Code

    .NET 11 Preview 5 focuses on under-the-hood runtime performance gains, streamlined APIs and language features that reduce boilerplate, plus built‑in security checks and incremental ASP.NET Core and EF Core improvements aimed at everyday developer productivity.

  • VS Code 1.124 Focuses on Agent Autonomy and Parallel Sessions

    Microsoft's June 2026 VS Code update turns on Autopilot by default and adds background sending for agent sessions.

Subscribe on YouTube