News

Unifying .NET with .NET Standard 2.0

The goal of .NET Standard is for "one library to rule them all," or more simply, one library of APIs that can be used across a number of platforms without much afterthought. The .NET team lets us in on their plans in the near future.

The .NET convergence is getting nearer to a reality, as Microsoft's .NET team publishes its plans for upcoming versions of .NET Standard, a master library of APIs.

".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," writes Microsoft's Immo Landwerth, in a blog post.

Currently, developers targeting one of the .NET variants had to understand how APIs being used in an app would interact with the base class library for the targeted .NET. With .NET Standard, developers won't have to give API compatibility much thought other than which API to use. At least that's the goal. Developers who have developed for Windows Phone 8.0 platforms have already gotten a taste of .NET Standard 1.0, and other versions already exist for differing versions of .NET platforms (.NET Core 1.6, all versions of .NET Framework 4.5 and newer, and Universal Windows Platform 10.0).

Version 2.0 of .NET Standard will be made available when the next versions of .NET Core, .NET Framework, Xamarin.iOS, Xamarin.Android, and UWP are shipped. Landwerth notes that even with 2.0 coming, compatibility issues are still a concern. .NET Standard 2.0 will be compatible with Portable Class Libraries, but he said the team will make a compatibility shim available so .NET Standard-based libraries can be referenced in .NET Framework binaries.

Landwerth suggests that developers start to use .NET Standard rather than PCLs: "The tooling for targeting .NET Standard 2.0 will ship in the same timeframe as the upcoming release of Visual Studio, code-named "Dev 15". You'll reference .NET Standard as a NuGet package. It will have first class support from Visual Studio, VS Code as well as Xamarin Studio."


About the Author

Michael Domingo is a long-time software publishing veteran, having started up and managed several developer publications for the Clipper compiler, Microsoft Access, and Visual Basic. He's also managed IT pubs for 1105 Media, including Microsoft Certified Professional Magazine and Virtualization Review before landing his current gig as Visual Studio Magazine Editor in Chief. Besides his publishing life, he's a professional photographer, whose work can be found by Googling domingophoto.

comments powered by Disqus

Featured

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

  • TypeScript Tops New JetBrains 'Language Promise Index'

    In its latest annual developer ecosystem report, JetBrains introduced a new "Language Promise Index" topped by Microsoft's TypeScript programming language.

Subscribe on YouTube