我仍然对 .NET Core 和 .NET Standard 之间的关系感到很困惑。
据我了解,.NET Standard 是一个接口(interface)定义(与 Katana 是 OWIN 的实现方式没有什么不同)。 .NET Framework 将实现 .NET Standard 的版本。
到目前为止这是正确的吗?
.NET Core 将其依赖项捆绑在其中。这些依赖项将使用 .NET Standard 接口(interface)的实现。那可能是 .NET Framework、Mono 或其他东西。
ASP Core 是引用了“Web”内容的 .NET Core。从某种意义上说,它几乎只是一个 Visual Studio 模板,它都可以通过 .NET Core 控制台应用程序构建。
我还接近正轨吗?
最后,如果我可以创建一个新的、未开发的应用程序,那么 .NET Core 应该是最受欢迎的技术(假设我不需要任何仅 .NET Framework 的程序集)。
最后一个问题,我可以从 .NET Core 项目中引用 GAC 中的 .NET Framework 程序集吗?
干杯
最佳答案
我的理解是 .NET Core
正在实现 .NET Standard
.
所以.NET Standard
更像是一个规范和 .NET Core
是实现该规范的实际框架。.NET Standard
也被其他框架实现,如 .NET Framework
或 Xamarin
(和 ASP.NET Core
建立在 .NET Core
之上)。
Here is offficial explanation :
How is .NET Standard different from .NET Core?
.NET Standard is a specification that covers which APIs a .NET platform has to implement.
.NET Core is a concrete .NET platform and implements the .NET Standard.
.NET Standard :
The .NET Standard is a formal specification of .NET APIs that are intended to be available on all .NET runtimes.
The various .NET runtimes implement specific versions of .NET Standard.
Introducing .NET Standard :
.NET Standard is a set of APIs that all .NET platforms have to implement. This unifies the .NET platforms and prevents future fragmentation.
.NET Standard 2.0 will be implemented by .NET Framework, .NET Core, and Xamarin. For .NET Core, this will add many of the existing APIs that have been requested.
Introducing .NET Core :
.NET Core is essentially a fork of the NET Framework
Another way to look at it: The .NET Framework has essentially two forks. One fork is provided by Microsoft and is Windows only. The other fork is Mono which you can use on Linux and Mac.
更多详情请阅读:
关于.net - .NET Core 是 .NET Standard 的 "Implementation"吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44638670/