Closed WeihanLi closed 5 years ago
We don't need any APIs from netstandard20. Why do we need to add it as a target? This library can be used in netstandard2.x projects without issue as is.
you can get more info from the docs
✔️ DO start with including a netstandard2.0 target.
Most general-purpose libraries should not need APIs outside of .NET Standard 2.0. .NET Standard 2.0 is supported by all modern platforms and is the recommended way to support multiple platforms with one target.
❌ AVOID including a netstandard1.x target.
.NET Standard 1.x is distributed as a granular set of NuGet packages, which creates a large package dependency graph and results in developers downloading a lot of packages when building. Modern .NET platforms, including .NET Framework 4.6.1, UWP and Xamarin, all support .NET Standard 2.0. You should only target .NET Standard 1.x if you specifically need to target an older platform.
✔️ DO include a netstandard2.0 target if you require a netstandard1.x target.
All platforms supporting .NET Standard 2.0 will use the netstandard2.0 target and benefit from having a smaller package graph while older platforms will still work and fall back to using the netstandard1.x target.
accounting to microsoft dotnet open source library guide here