Visual studio new project wizard: .NET Core vs .NET Standard library?
In the new project wizard in Visual Studio 2017, I see both the option to create a new .NET Standard library as well as a new .NET Core library. I understand that .NET Standard is a specification while .NET Core is a cross-platform implementation of that spec.
But can someone explain the real differences when creating libraries from each of the following ways? To make matters worse, if you look closely, both dialogs also have a drop-down on the top that says ".NET Framework 4.6.2" :( - what's up with that?
.NET Standard Library
.NET Core Library
Side note: The naming convention is confusing. ".NET 5" sounds simpler
The upper drop down (".NET Framework 4.6.2") do nothing when you want to create .NET Core or .NET Standard project.
(Maybe related conversation: https://twitter.com/bradwilson/status/836434975985577984)
Using this diagram
If you create a .NET Core library your library can only be used by things in the Blue section and only use things from the Blue section or the Red section. If you create a .NET Standard library your library can be used by things in the Green, Blue, Orange, and Red sections but only use things from the Red section.
The reason you may want to use a Core Library over a standard library is you have potentially access to more functions and libraries to call from your code if you know you are targeting Core only. You don't need to keep the public API's surface area you consume restricted to things that are allowable in all 4 sections.
链接地址: http://www.djcxy.com/p/81892.html上一篇: .net标准是.net核心的跨平台吗?