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

查看:72
本文介绍了什么是“ .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上的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)字节码



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



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



Mono 运行时,它可以运行在Windows以外的各种操作系统上,
从.NET 4.5开始的Framework类库中的几乎所有名称空间 VB C#编译器



进入.NET Core:运行时和一个基本要求ss库。所有其他功能都通过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天全站免登陆