.NET Tips and Tricks

Blog archive

The New Cross-Platform Standard: Version 2.0

Microsoft has always had a plan to support cross-platform development using the .NET Framework. For the longest time, the plan was for you to create a Portable Class Library (PCL) -- any API you used from a PCL was supposed to work on any .NET supported platform.

If you did create a PCL project, you were given a list of platforms and asked to check off which ones you wanted to run on. After checking off your choices, what you could access in your library was the intersection of the .NET Framework APIs supported on each of those platforms. Fundamentally, that meant the more platforms you checked off, the less of the .NET Framework you got to use (in fact, some combinations would take out whole versions of Visual Studio).

The process wasn't dynamic, however. In reality, what you were picking was one of a set of predefined profiles that combined various .NET Framework APIs.

Microsoft has a new approach: Standard Class Library projects. A Standard Class Library consists of those APIs that "are intended to be available on all .NET implementations." The news here is that there is only one Standard and it supports all the .NET platforms -- no more profiles agglomerated into an arbitrary set of interfaces.

The catch here is that the Standard may not include something you want ... at least, not yet. With PCLs there was always the possibility that, if you dropped one of the platforms you wanted to support, you might pick up the API you wanted. That's not an option with the Standard, which is monolithic. In some ways it's like setting the version of the .NET Framework you want to support in your project's properties: The lower the version you pick, the less functionality you have.

Obviously, then, what matters in the .NET Standard is comprehensiveness. There have been several iterations of the .NET Standard specification, each of which includes more .NET Framework APIs. The latest version (as of June, 2018) is .NET Standard 2.0 and (like version 1.3 before it) it's a real watershed in terms of adding common functionality -- more than 5,000 APIs. With version 2.0 there's a very high likelihood that what you want to use is in the Standard.

You can check out the whole list here. The page also includes links to a list of namespaces and APIs added in any version of the .NET Standard. It's telling that the API list for version 2.0 is too big to display in anything but its raw format.

Posted by Peter Vogel on 06/26/2018


comments powered by Disqus

Featured

  • ASP.NET Core and Blazor Dominate 'Relatively Small' .NET 6 Preview 6

    In what Microsoft called a “relatively small” release, .NET 6 Preview 6 delivered its biggest set of updates to ASP.NET Core and Blazor. New features include required component parameters, JavaScript interop enhancements, and support for state persistence in Blazor Server apps. Other areas like .NET MAUI and EF Core saw targeted improvements focused on UI styling, accessibility, and standardized configuration conventions. Visual Studio 2022 Preview 2 is now officially supported, enabling key tools like .NET MAUI development and C# Hot Reload.

  • GitHub Copilot Is Rising All-Time Contributor to .NET MAUI Repo

    The .NET MAUI team is pursuing a dream scenario where GitHub Copilot handles a straightforward issue all by itself with just minimal initial instructions.

  • Kernel Ridge Regression with Stochastic Gradient Descent Training Using C#

    Dr. James McCaffrey presents a complete end-to-end demonstration of the kernel ridge regression technique to predict a single numeric value. The demo uses stochastic gradient descent, one of two possible training techniques. There is no single best machine learning regression technique. When kernel ridge regression prediction works, it is often highly accurate.

  • VS Code v1.102 Doubles Down on GitHub Copilot and AI-Enhanced Development

    VS Code’s June 2025 update supercharges GitHub Copilot with new chat customization tools, smarter inline completions, and an open-source Copilot Chat extension that makes AI-assisted coding more transparent and flexible.

  • Azure Vibe Coding for the Enterprise Masses: Microsoft Partners with Replit

    Replit has partnered with Microsoft to bring its AI-powered, natural language coding platform to Azure, enabling enterprise workers to build and deploy software without writing code—marking a major step toward agentic, no-code application development at scale.

Subscribe on YouTube