问题描述
我仍然对 .NET Core 和 .NET Standard 如何相互关联感到困惑.
I'm still pretty confused about how .NET Core and .NET Standard relate to each other.
据我所知,.NET Standard 是一个接口定义(与 Katana 是 OWIN 的实现方式没有什么不同)..NET Framework 将实现 .NET Standard 的版本.
From what I understand, .NET Standard is an interface definition (not dissimilar in the way the Katana is an implementation of OWIN). .NET Framework will implement versions of .NET Standard.
到目前为止是否正确?
.NET Core 将其依赖项捆绑在其中.这些依赖项将使用 .NET Standard 接口的实现.那可能是 .NET Framework、Mono 或其他东西.
.NET Core bundles up its dependencies inside it. Those dependencies will use the .NET Standard interface's implementation. That may be the .NET Framework, Mono or something else.
ASP Core 是引用了Web"内容的 .NET Core.几乎只是一个 Visual Studio 模板,因为它可以通过 .NET Core 控制台应用程序构建.
ASP Core is .NET Core with "Web" stuff referenced. Pretty much just a Visual Studio template in the sense that it can all by built up from a .NET Core console application.
我还接近正轨吗?
最后,如果我可以创建一个新的、全新的应用程序,那么 .NET Core 应该是最受欢迎的技术(假设我不需要任何仅 .NET Framework 的程序集).
Finally, if I can creating a new, green-field application then .NET Core should be the favoured technology (assuming that I don't need any of the .NET Framework only assemblies).
最后一个问题,我可以从 .NET Core 项目中引用 GAC 中的 .NET Framework 程序集吗?
干杯
推荐答案
我的理解是 .NET Core
正在实现 .NET Standard
.
My understanding is that the .NET Core
is implementing the .NET Standard
.
所以 .NET Standard
更像是一种规范,而 .NET Core
是实现该规范的实际框架.
So .NET Standard
is more like a specification and .NET Core
is an actual framework which implements that specification.
.NET Standard
也由其他框架实现,例如 .NET Framework
或 Xamarin
(和 ASP.NET Core
建立在 .NET Core
之上.
.NET Standard
is also implemented by other frameworks like as .NET Framework
or Xamarin
(and ASP.NET Core
which is built on the top of .NET Core
).
.NET Standard 与 .NET Core 有何不同?
.NET Standard 是一个规范,涵盖了 .NET 平台必须实现的 API.
.NET Standard is a specification that covers which APIs a .NET platform has to implement.
.NET Core 是一个具体的 .NET 平台并实现了 .NET Standard.
.NET Core is a concrete .NET platform and implements the .NET Standard.
.NET Standard 是 .NET API 的正式规范,旨在用于所有 .NET 运行时.
各种 .NET 运行时实现特定版本的 .NET Standard.
The various .NET runtimes implement specific versions of .NET Standard.
.NET Standard 是一组所有 .NET 平台都必须实现的 API.这统一了 .NET 平台并防止了未来的碎片化.
.NET Standard 2.0 将由 .NET Framework、.NET Core 和 Xamarin 实现.对于 .NET Core,这将添加许多已请求的现有 API.
.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.
.NET Core 本质上是 NET Framework 的一个分支
另一种看待它的方式:.NET Framework 本质上有两个分支.一个 fork 由 Microsoft 提供,并且仅适用于 Windows.另一个分支是 Mono,你可以在 Linux 和 Mac 上使用.
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.
更多详情请阅读:
For more details please read:
- .NET 标准常见问题解答
- .NET Standard (该表列出了所有版本.NET Standard 和支持的平台)
- 介绍 .NET Standard
- 介绍 .NET Core
这篇关于.NET Core 是一种“实现"吗?.NET 标准?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!