.net - .NET Core 是 .NET Standard 的 "Implementation"吗?

标签 .net asp.net-core .net-core .net-standard

我仍然对 .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 FrameworkXamarin (和 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 Standard FAQ
  • .NET Standard (该表列出了 .NET Standard 的所有版本和支持的平台)
  • Introducing .NET Standard
  • Introducing .NET Core
  • 关于.net - .NET Core 是 .NET Standard 的 "Implementation"吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44638670/

    相关文章:

    visual-studio-2017 - Netstandard.Library 1.6.1 被项目阻止

    .net - 用于实时消息传递的 BizTalk

    .net - 如何读取父线程或线程的父函数或调用堆栈

    c# - Asp.Net Core 3.1 Cookies 未附加 Razor Pages C#

    c# - serilog通过.net核心中的记录器引用为对象建立索引

    c# - IdentityServer4多个WSFederation-providers导致异常

    python - 如何在 IronPython 中卸载 .NET 程序集引用

    c# - 修改 Gridview 中的超链接字段文本

    asp.net-core - 如何在 AutoMapper 配置文件类中注入(inject)服务

    iis - 如何配置 .net 核心 API 以在 IIS 中工作?