.NET Standard vs .NET Core
.NET Standard is a specification of .NET APIs intended to be available on .NET implementations. This enables to define uniform set of BCL APIs for all .NET implementations.
.NET Core is one such implementation of .NET Standard. .NET Framework is another implementation of .NET Standard.
Image from .NET Blog
Federicos answer gives you a graphical overview of how each framework evolve with versions. Take a look at below diagram from Microsoft Docs.
Targeting .NET Standard increases your platform support whereas targeting a particular .NET platform such as .NET Core (or .NET Framework) will allow you to use all the platform features for that platform.
I will try to further clarify your doubts and extend Jon Skeet answer.
.NET Standard is a specification, so a library compiled for a specific .NET Standard version can be used in different .NET Standard implementations.
As said in my other comment, a good analogy for the relationship between .NET Standard and other .NET Standard Implementations (.NET Core, .NET Framework, etc) is this gist by David Fowler: .NET Standard versions are Interfaces
, while frameworks are implementations of those interfaces.
This simplified diagram may help to understand this relationship:
Anything targetting NetCore10
has access to INetStandard15
APIs and NetCore10
specific APIs (such as DotNetHostPolicy
).
Of course this library cannot be used in different INetStandard15
implementations (NetCore10
is not convertible to NetFramework462
or Mono46
).
If you, instead, need access only to INetStandard15
APIs (and target that specification instead of a concrete framework) your library may be used by any framework which implements it (NetCore10
, NetFramework462
, etc.)
Note: in the original analogy David Fowler used interfaces for both .NET Standard versions and frameworks implementations. I believe that using interfaces and classes is, instead, more intuitive and better represents the relationship between specifications and concrete implementations.
.NET Core is an implementation of .NET Standard. It's available on multiple operating systems, but that's not the same thing - there are other implementations of .NET Standard as well.
So if you create a .NET Core library, it will have access to things that are implemented in .NET Core, but aren't part of .NET Standard, and your library won't be compatible with other implementations of .NET Standard, such as Xamarin, Tizen, full .NET desktop framework etc.
In short: to achieve maximum portability, make your library target .NET Standard.