ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
.NET Conf 2018: Build Great Libraries using .NET Standard
.NET Conf 2018: Build Great Libraries using .NET Standard
What is .NET Standard?
$ dotnet new classlib -o My.Class.Library
.NET Standard
.NET Core
.NET Framework
Xamarin
~
~
HTML specification
Browsers
.NET Standard
.NET Conf 2018: Build Great Libraries using .NET Standard
.NET Conf 2018: Build Great Libraries using .NET Standard
https://github.com/dotnet/standard/tree/master/docs/planning/netstandard-2.1
Using platform-specific APIs
from .NET Standard
.NET Conf 2018: Build Great Libraries using .NET Standard
https://aka.ms/apianalyzer
.NET Conf 2018: Build Great Libraries using .NET Standard
.NET Conf 2018: Build Great Libraries using .NET Standard
.NET Conf 2018: Build Great Libraries using .NET Standard
.NET Standard &
.NET Framework
.NET Conf 2018: Build Great Libraries using .NET Standard
.NET Conf 2018: Build Great Libraries using .NET Standard
.NET Conf 2018: Build Great Libraries using .NET Standard
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo="v1.0.3705">
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable"
publicKeyToken="b03f5f7f11d50a3a¡°
culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0"/>
</dependentAssembly>
</assemblyBinding>
.NET Conf 2018: Build Great Libraries using .NET Standard
Versioning
Kind When to increment Comment
Package Version Every change The ID of the NuGet package.
Assembly Version As you see fit The version number of the
assembly. Used by the loader to
resolve assemblies.
File Version Every change Generic concept, used by installers
to determine which file is newer.
Informational Version As you see fit Display string, doesn¡¯t need to be a
version.
.NET Conf 2018: Build Great Libraries using .NET Standard
Tips & Tricks
.NET Conf 2018: Build Great Libraries using .NET Standard
.NET Conf 2018: Build Great Libraries using .NET Standard
.NET Conf 2018: Build Great Libraries using .NET Standard
https://aka.ms/netstandardFaq
https://aka.ms/netstandardDocs
.NET Conf 2018: Build Great Libraries using .NET Standard
My Standard Library 2.x
.NET Standard Library .NET Framework LibraryPortable Class Library
.NET FRAMEWORK .NET CORE XAMARIN
Via Portability
Via Compatibility Shim
Legend
Application Type
Is able to reference
TYPE
FORWARDING
This happens when you build a .NET Standard-based Library
TYPE
FORWARDING
This happens when you load .NET Standard-based library
TYPE
FORWARDING
This happens when you build a .NET Standard-based library with platform-specific extensions
TYPE
FORWARDING
This happens when you load .NET Standard-based library with platform-specific extensions
EXCEPTION
TYPE
FORWARDING

More Related Content

.NET Conf 2018: Build Great Libraries using .NET Standard