什么是“.NET Core"? [英] What is ".NET Core"?

查看:20
本文介绍了什么是“.NET Core"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近在官方 ,我发现它既简短又非常好的.它涵盖了 .NET Standard、.NET Core 和 .NET Framework 及其关系.我强烈推荐它.

解决方案

来自 .NET 博客 宣布 .NET 2015 预览版:.NET 的新时代:

<块引用>

.NET Core 有两个主要组件.它包含一个小型运行时,它是从与 .NET Framework CLR 相同的代码库构建的..NET Core 运行时包括相同的 GC 和 JIT (RyuJIT),但不包括应用程序域或代码访问安全性等功能.运行时通过 NuGet 提供,作为 [ASP.NET Core] 包的一部分.

.NET Core 还包括基类库.这些库在很大程度上与 .NET Framework 类库的代码相同,但已被分解(删除依赖项)以使我们能够提供较小的库集.这些库在 NuGet.org 上作为 System.* NuGet 包提供.

还有:

<块引用>

[ASP.NET Core] 是第一个采用 .NET Core 的工作负载.[ASP.NET Core] 可在 .NET Framework 和 .NET Core 上运行.[ASP.NET Core] 的一个关键价值在于它可以在同一台机器上运行多个版本的 [.NET Core].网站 A 和网站 B 可以在同一台机器上运行两个不同版本的 .NET Core,也可以使用相同的版本.

简而言之:首先,有 Microsoft .NET Framework,它包含一个执行应用程序和库代码的运行时,以及一个 几乎完整记录 标准类库.

运行时是通用语言运行时,它实现了通用语言基础设施,与 JIT 编译器来运行CIL(以前称为 MSIL)字节码.

考虑到 .NET 的历史和目的,Microsoft 的 .NET 规范和实现非常以 Windows 和 IIS 为中心并且胖".有库、命名空间和类型较少的变体,但其中很少有对 Web 或桌面开发有用,或者 从法律角度移植很麻烦.

因此,为了提供可以在非 Windows 机器上运行的非 Microsoft 版本的 .NET,必须开发替代方案.不仅运行时必须为此移植,而且整个框架类库也必须被广泛采用.最重要的是,要完全独立于 Microsoft,将需要一个用于最常用语言的编译器.

Mono 是少数之一,如果不是唯一的选择runtime 的实现,它运行在除 Windows 之外的各种操作系统上,几乎所有来自 .NET 4.5 的框架类库的命名空间VBC# 编译器.

进入 .NET Core:运行时的开源实现,以及最小的基类库.所有附加功能都通过 NuGet 包提供,使用应用程序本身部署特定的运行时、框架库和第三方包.

ASP.NET Core 是 MVC 和 WebAPI 的新版本,与瘦 HTTP 服务器抽象捆绑在一起,可在 .NET Core 运行时运行 - 但也可在 .NET Framework 上运行.

Recently in an official .NET Framework Blog it was announced that .NET Core is going open source.

Ironically, the author mentions that what .NET Core is will be explained in the next post. Some more details are mentioned in another announcement post.

From a supplied diagram:

and articles text itself, I would assume that .NET Core (beside obvious things like being open-sourced) is a modular re-implementation of the full .NET. I.e. framework components are loaded as necessary, much like NuGet packages are loaded now. And now ASP.NET 5 is one of the modules that is already implemented. Is my understanding of .NET Core correct? Maybe I'm missing something?


I have found a recent article which I found both short and very good. It covers .NET Standard, .NET Core, and .NET Framework and their relationship. I highly recommend it.

解决方案

From the .NET blog Announcing .NET 2015 Preview: A New Era for .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] is the first workload that has adopted .NET Core. [ASP.NET Core] runs on both the .NET Framework and .NET Core. A key value of [ASP.NET Core] is that it can run on multiple versions of [.NET Core] on the same machine. Website A and website B can run on two different versions of .NET Core on the same machine, or they can use the same version.

In short: first, there was the Microsoft .NET Framework, which consists of a runtime that executes application and library code, and a nearly fully documented standard class library.

The runtime is the Common Language Runtime, which implements the Common Language Infrastructure, works with The JIT compiler to run the CIL (formerly MSIL) bytecode.

Microsoft's specification and implementation of .NET were, given its history and purpose, very Windows- and IIS-centered and "fat". There are variations with fewer libraries, namespaces and types, but few of them were useful for web or desktop development or are troublesome to port from a legal standpoint.

So in order to provide a non-Microsoft version of .NET, which could run on non-Windows machines, an alternative had to be developed. Not only the runtime has to be ported for that, but also the entire Framework Class Library to become well-adopted. On top of that, to be fully independent from Microsoft, a compiler for the most commonly used languages will be required.

Mono is one of few, if not the only alternative implementation of the runtime, which runs on various OSes besides Windows, almost all namespaces from the Framework Class Library as of .NET 4.5 and a VB and C# compiler.

Enter .NET Core: an open-source implementation of the runtime, and a minimal base class library. All additional functionality is delivered through NuGet packages, deploying the specific runtime, framework libraries and third-party packages with the application itself.

ASP.NET Core is a new version of MVC and WebAPI, bundled together with a thin HTTP server abstraction, that runs on the .NET Core runtime - but also on the .NET Framework.

这篇关于什么是“.NET Core"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆