News

Microsoft Says .NET 5 Replaces .NET Standard (Except for ...)

Does .NET 5 replace .NET Standard? Well, for the most part, says Microsoft's Immo Landwerth, who penned a blog post to answer developer questions about the future of .NET Standard.

He said .NET 5 improves code sharing and replaces .NET Standard except for cases where developers need to extend the reach of their code sharing to support older frameworks such as .NET Framework or share code between specific existing frameworks.

The .NET Journey
[Click on image for larger view.] The .NET Journey (source: Microsoft).

Looking ahead, developers should focus on .NET 5, which has an official target framework name (TFM) -- used in project files and NuGet packages -- of net5.0.

In summary, Landwerth said developers should :

  • Use netstandard2.0 to share code between .NET Framework and all other platforms.
  • Use netstandard2.1 to share code between Mono, Xamarin and .NET Core 3.x.
  • Use net5.0 for code sharing moving forward.

.NET Standard, to recap, is a formal specification of .NET APIs that are intended to be available on all .NET implementations. Or, as Landwerth said in 2016, ".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."

It was used along with the new open source, cross-platform evolution of the proprietary, Windows-only .NET Framework: .NET Core.

.NET Core, of course, is further evolving into the unifying .NET 5, which will debut in its final form next month, having just been released in a go live, production-ready Release Candidate 1 this week (one more RC will follow).

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

Landwerth, in a Sept. 15 blog post, said, ".NET 5 will be a single product with a uniform set of capabilities and APIs that can be used for Windows desktop apps, cross-platform mobile apps, console apps, cloud services, and websites"

He further discussed how .NET 5 can be seen as the combination of .NET Standard and .NET Core.

While .NET Standard was previously described as solving code-sharing problems for .NET developers, Landwerth pointed out problems with that scheme, such as:

  • .NET Standard versions slowly: For various technical reasons, ".NET Standard can't ship very frequently. So, if a feature misses a particular release, you might have to wait for a couple of years before it's even available and potentially even longer until this version of .NET Standard is widely supported."
  • .NET Standard needs a decoder ring: This is a complicated issue about mapping .NET Standard versions to their implementations.
  • .NET Standard exposes platform-specific APIs: Even though these will be avoided in net5.0 and future versions, Landwerth said, "it's impossible for us to predict the future. For example, with Blazor WebAssembly we have recently added a new environment where .NET runs and some of the otherwise cross-platform APIs (such as threading or process control) can't be supported in the browser's sandbox."
The .NET Schedule
[Click on image for larger view.] The .NET Schedule (source: Microsoft).

In conclusion, Landwerth said, "While .NET Standard 2.1 will be the last version of .NET Standard, .NET 5 and all future versions will continue to support .NET Standard 2.1 and earlier. You should think of net5.0 (and future versions) as the foundation for sharing code moving forward."

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Mastering Blazor Authentication and Authorization

    At the Visual Studio Live! @ Microsoft HQ developer conference set for August, Rockford Lhotka will explain the ins and outs of authentication across Blazor Server, WebAssembly, and .NET MAUI Hybrid apps, and show how to use identity and claims to customize application behavior through fine-grained authorization.

  • Linear Support Vector Regression from Scratch Using C# with Evolutionary Training

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the linear support vector regression (linear SVR) technique, where the goal is to predict a single numeric value. A linear SVR model uses an unusual error/loss function and cannot be trained using standard simple techniques, and so evolutionary optimization training is used.

  • Low-Code Report Says AI Will Enhance, Not Replace DIY Dev Tools

    Along with replacing software developers and possibly killing humanity, advanced AI is seen by many as a death knell for the do-it-yourself, low-code/no-code tooling industry, but a new report belies that notion.

  • Vibe Coding with Latest Visual Studio Preview

    Microsoft's latest Visual Studio preview facilitates "vibe coding," where developers mainly use GitHub Copilot AI to do all the programming in accordance with spoken or typed instructions.

  • Steve Sanderson Previews AI App Dev: Small Models, Agents and a Blazor Voice Assistant

    Blazor creator Steve Sanderson presented a keynote at the recent NDC London 2025 conference where he previewed the future of .NET application development with smaller AI models and autonomous agents, along with showcasing a new Blazor voice assistant project demonstrating cutting-edge functionality.

Subscribe on YouTube