Sharing code cross-platform with .NET Standard class libraries

Before .NET Standard, there was Portable Class Libraries (PCL). With PCLs, you can create a library of code and explicitly specify which platforms that you want the library to support, such as Xamarin, Silverlight, Windows 8, and so on. Your library can then use the intersection of APIs that are supported by the specified platforms.

Microsoft has realized that this is unsustainable, so they have been working on .NET Standard---a single API that all future .NET platforms will support.

If you want to create a library of types that will work across .NET Framework (on Windows), .NET Core (on Windows, macOS, and Linux), and Xamarin (on iOS, Android, and Windows Mobile), you can do so most ...

Get C# 7 and .NET Core: Modern Cross-Platform Development - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.