最近在一个官方的。net框架博客中宣布。net Core将会开源。
具有讽刺意味的是,作者提到。net Core是什么将在下一篇文章中解释。更多细节将在另一篇公告中提及。
从提供的图表:
和文章文本本身,我认为。net Core(除了像开源这样明显的东西)是完整的。net的模块化重新实现。也就是说,框架组件是根据需要加载的,就像现在加载NuGet包一样。现在是ASP。NET 5是其中一个已经实现的模块。我对。net Core的理解正确吗?也许我遗漏了什么?
我发现了一篇最近的文章,我觉得既短又好。它涵盖了。net标准、。net核心和。net框架以及它们之间的关系。我强烈推荐它。
当前的文档很好地解释了。net Core是什么,需要使用的区域等等。.NET Core有以下特点:
Flexible deployment: Can be included in your app or installed
side-by-side user- or machine-wide.
Cross-platform: Runs on Windows,
macOS and Linux; can be ported to other OSes. The supported operating systems (OSes), CPUs and application scenarios will grow over time,
provided by Microsoft, other companies, and individuals.
Command-line tools: All product scenarios can be exercised at the command-line.
Compatible: .NET Core is compatible with .NET Framework, Xamarin and
Mono, via the .NET Standard Library.
Open source: The .NET Core
platform is open source, using MIT and Apache 2 licenses.
Documentation is licensed under CC-BY. .NET Core is a .NET Foundation
project.
Supported by Microsoft: .NET Core is supported by Microsoft,
per .NET Core Support
下面是。net Core包含的内容:
A .NET runtime, which provides a type system, assembly loading, a garbage collector, native interoperability and other basic services.
A set of framework libraries, which provide primitive data types, application composition types and fundamental utilities.
A set of SDK tools and language compilers that enable the base developer experience, available in the .NET Core SDK.
The 'dotnet' application host, which is used to launch .NET Core applications. It selects the runtime and hosts the runtime, provides an assembly loading policy and launches the app. The same host is also used to launch SDK tools in much the same way.
.NET博客宣布。net 2015预览:.NET的新时代:
.NET Core has two major components. It includes a small runtime that is built from the same codebase as the .NET Framework CLR. The .NET Core runtime includes the same GC and JIT (RyuJIT), but doesn’t include features like Application Domains or Code Access Security. The runtime is delivered via NuGet, as part of the [ASP.NET Core] package.
.NET Core also includes the base class libraries. These libraries are largely the same code as the .NET Framework class libraries, but have been factored (removal of dependencies) to enable us to ship a smaller set of libraries. These libraries are shipped as System.* NuGet packages on NuGet.org.
And:
[ASP。NET Core]是第一个采用。NET Core的工作负载。[ASP。NET Core]运行在。NET Framework和。NET Core上。关键值[ASP. ASP.]NET Core]的优点是它可以在[的多个版本上运行。NET Core]在同一台机器上。网站A和网站B可以在同一台机器上的两个不同版本的。net Core上运行,或者它们可以使用相同的版本。
简而言之:首先是Microsoft . net Framework,它由执行应用程序和库代码的运行时和一个几乎完整文档化的标准类库组成。
运行时是公共语言运行时,它实现了公共语言基础结构,与JIT编译器一起运行CIL(以前是MSIL)字节码。
微软的。net规范和实现,考虑到它的历史和目的,非常以Windows和iis为中心,而且很“胖”。虽然也存在一些带有较少库、名称空间和类型的变体,但它们中很少有对web或桌面开发有用的,或者从法律角度来看移植起来很麻烦。
因此,为了提供一个可以在非windows机器上运行的非微软版本的。net,必须开发一种替代方案。不仅运行时需要移植,整个框架类库也需要移植。最重要的是,要完全独立于微软,就需要一个最常用语言的编译器。
Mono是运行时的少数几个(如果不是唯一的)替代实现之一,它可以在Windows以外的各种操作系统上运行,
几乎所有的命名空间都来自于。net 4.5的框架类库以及VB和c#编译器。
进入。net Core:运行时的开源实现,以及最小的基类库。所有附加的功能都是通过NuGet包交付的,与应用程序本身一起部署特定的运行时、框架库和第三方包。
ASP。NET Core是MVC和WebAPI的新版本,与一个瘦HTTP服务器抽象捆绑在一起,运行在。NET Core运行时上——但也运行在。NET框架上。
当前的文档很好地解释了。net Core是什么,需要使用的区域等等。.NET Core有以下特点:
Flexible deployment: Can be included in your app or installed
side-by-side user- or machine-wide.
Cross-platform: Runs on Windows,
macOS and Linux; can be ported to other OSes. The supported operating systems (OSes), CPUs and application scenarios will grow over time,
provided by Microsoft, other companies, and individuals.
Command-line tools: All product scenarios can be exercised at the command-line.
Compatible: .NET Core is compatible with .NET Framework, Xamarin and
Mono, via the .NET Standard Library.
Open source: The .NET Core
platform is open source, using MIT and Apache 2 licenses.
Documentation is licensed under CC-BY. .NET Core is a .NET Foundation
project.
Supported by Microsoft: .NET Core is supported by Microsoft,
per .NET Core Support
下面是。net Core包含的内容:
A .NET runtime, which provides a type system, assembly loading, a garbage collector, native interoperability and other basic services.
A set of framework libraries, which provide primitive data types, application composition types and fundamental utilities.
A set of SDK tools and language compilers that enable the base developer experience, available in the .NET Core SDK.
The 'dotnet' application host, which is used to launch .NET Core applications. It selects the runtime and hosts the runtime, provides an assembly loading policy and launches the app. The same host is also used to launch SDK tools in much the same way.
我今天试图在Visual Studio 2017中创建一个新项目(最近从Visual Studio 2015升级),并注意到项目类型的一组新的选择。它们要么是新的,要么是我已经有一段时间没有开始一个新项目了!!:)
我偶然发现了这个文档链接,发现它非常有用,所以我分享。文章中还提供了子弹的详细信息。我只是在这里列出一些要点:
You should use .NET Core for your server application when:
You have cross-platform needs.
You are targeting microservices.
You are using Docker containers.
You need high performance and scalable systems.
You need side by side of .NET versions by application.
You should use .NET Framework for your server application when:
Your application currently uses .NET Framework (recommendation is to extend instead of migrating)
You need to use third-party .NET libraries or NuGet packages not available for .NET Core.
You need to use .NET technologies that are not available for .NET Core.
You need to use a platform that doesn’t support .NET Core.
这个链接提供了一个。net术语表。
编辑10/7/2020
检查。net 5.0 - "…只要一个。net,你就可以用它来瞄准Windows, Linux, macOS, iOS, Android, tvOS, watchOS和WebAssembly等等。”
预计将于2020年11月上映。