News

Xamarin Supports .NET Standard Libraries

Support for .NET Standard Libraries means Xamarin apps can share code among other .NET platforms, including .NET Core and ASP.NET Core.

Xamarin now has support for the new .NET Standard Libraries, which means Xamarin can now be used to share code among more .NET platforms, including .NET Core and ASP.NET Core.

Xamarin, which was acquired by Microsoft earlier this year, is a popular suite of tools for creating cross-platform mobile apps with one codebase written in Visual C#.

The .NET Standard Libraries can be thought of as in improved Portable Class Library, according to a blog post from James Montemagno. They specify APIs that can be used on all .NET runtimes, thus any .NET Standard Library will support any runtime that supports .NET Standard Platform.

"The .NET Standard Library is a formal specification of .NET APIs that are intended to be available on all .NET runtimes," wrote Montemagno. "You can think of it as a simplified, yet expanded, Portable Class Library. It is a single library with a uniform API for all .NET Platforms including .NET Core. You just create a single .NET Standard Library and use it from any runtime that supports .NET Standard Platform."

Microsoft said the .NET Standard Library enables the following scenarios:

  • Defines uniform set of BCL APIs for all .NET platforms to implement, independent of workload.
  • Enables developers to produce portable libraries that are usable across .NET runtimes, using this same set of APIs.
  • Reduces and hopefully eliminates conditional compilation of shared source due to .NET APIs, only for OS APIs.

The new functionality works in the Xamarin Studio IDE (today updated to version 6.0.2 to support that functionality) and in Visual Studio 2015, provided the latter has Update 3 installed and is updated to include Xamarin 4.1.2.

While the announcement heralds the ability to consume and compile the .NET Standard Libraries in the updated Xamarin Studio 6.0.2, "The ability to create .NET Standard Libraries in Xamarin Studio on macOS will be available in the future," Montemagno said.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • 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.

Subscribe on YouTube