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 for Converge360.

comments powered by Disqus

Featured

  • Full Stack Hands-On Development with .NET

    In the fast-paced realm of modern software development, proficiency across a full stack of technologies is not just beneficial, it's essential. Microsoft has an entire stack of open source development components in its .NET platform (formerly known as .NET Core) that can be used to build an end-to-end set of applications.

  • .NET-Centric Uno Platform Debuts 'Single Project' for 9 Targets

    "We've reduced the complexity of project files and eliminated the need for explicit NuGet package references, separate project libraries, or 'shared' projects."

  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

Subscribe on YouTube