是.NET执行环境(DNX)类似单声道?单声道、类似、环境、NET

2023-09-02 02:10:12 作者:如果爱请遗忘

下面是DNX的说明:

  

在.NET执行环境(DNX)是一个软件开发工具包   (SDK)和运行时环境,有你需要建立的一切   并运行.NET应用程序适用于Windows,Mac和Linux。它提供了一个   主机进程,CLR托管逻辑和管理的入口点的发现。 DNX   是专为运行的跨平台的ASP.NET Web应用程序,但它   可以运行其它类型的.NET应用程序,同样,如跨平台   控制台应用程序。

是单声道的DNX的选择吗?如果不是,那会是怎样的区别呢?

解决方案   

是单声道的DNX的选择吗?如果不是,那会是怎样的区别呢?

Mono是一个开源的开发平台。它的实现是基于在CLI说明书中,诸如由Microsoft提供的平台。它包括一个C#编译器,运行时,BCL和一些所谓的MCL(单声道类库,这是一个扩展的BCL)。单本身可以在Linux,OSX,BSD和Windows上不同的架构上运行。

DNX是包含所有的构建和运行应用程序所需的位的SDK(包括自定义实用程序,如 DNU 这是用来构建和打包的应用程序) ,其中包括CLR(目前它部署的 CoreCLR )。这CoreCLR也可以与单声道切换,这意味着它将消耗在Mono运行时,编译器等

的所有服务

单声道,而不是DNX提供了完整的平台(运行时,BCL,JIT等)。 DNX用于在最低水平,其中援引的CoreCLR本机进程。 DNX将用于场景,如自主机或建筑物,并在命令行中运行。

由于@xanatos指出,DNX渴望可以出货的运行与应用程序,其中多个运行时就能比邻而居互不干扰。

也许这图片可以澄清:

下面是DNX可以在上面运行列表(X86显示两次,因为它是默认的):

 活动版本运行架构位置别名
------ ------- ------- ------------ -------- -----
  * 1.0.0-beta2-10735 CLR 86 C: Users 用户victorhu  .dnx 运行时默认
       1.0.0-dev的CLR的x64 C: Users 用户victorhu  .dnx 运行时CLR-64-dev的
       1.0.0-dev的CLR的x86 C: Users 用户victorhu  .dnx 运行时CLR-86-dev的
       1.0.0-dev的coreclr xd64 C: Users 用户victorhu  .dnx 运行时coreclr-64-dev的
       1.0.0-dev的coreclr 86 C: Users 用户victorhu  .dnx 运行时coreclr 86开发
       1.0.0-dev的单C: Users 用户victorhu  .dnx 运行时将单开发
 
Mono 3.8.0 发布,跨平台的 .NET 运行环境

有一个广泛的维基页面地名释义的DNX结构为多。 @Will指出 ASP.NET文档页面为好。

Here is the description of DNX:

The .NET Execution Environment (DNX) is a software development kit (SDK) and runtime environment that has everything you need to build and run .NET applications for Windows, Mac and Linux. It provide a host process, CLR hosting logic and managed entry point discovery. DNX was built for running cross-platform ASP.NET Web applications, but it can run other types of .NET applications, too, such as cross-platform console apps.

Is DNX alternative of mono? If not, then what will be the difference?

解决方案

Is DNX alternative of mono? If not, then what will be the difference?

Mono is an open sourced development platform. It's implementation is based on the CLI specification, such as the platform that is provided by Microsoft. It includes a C# compiler, a runtime, a BCL and something called MCL (Mono Class Library, which is an extensions to the BCL). Mono itself can run on Linux, OSX, BSD and Windows on varying architectures.

DNX is an SDK containing all of the bits needed to build and run an application (including custom utilities such as the dnu which is used to build and package the app), including the CLR (currently it deploys with CoreCLR). This CoreCLR can also be switched with Mono, which means it will be consuming all services of the Mono runtime, compiler, etc.

Mono as opposed to DNX provides the full platform (Runtime, BCL, JIT, etc). DNX is used at the lowest level as the Native Process which invoked the CoreCLR. DNX would be used for scenarios such as self-host or building and running from the command line.

As @xanatos points out, DNX aspire to be able to ship the runtime with the application, where multiple runtimes will be able to live side by side without interfering each other.

Perhaps this image can clarify:

Here is the list which DNX can run on top (x86 showing twice as it is the default):

Active Version           Runtime Architecture Location                           Alias
------ -------           ------- ------------ --------                           -----
  *    1.0.0-beta2-10735 clr     x86          C:Usersvictorhu.dnxruntimes default
       1.0.0-dev         clr     x64          C:Usersvictorhu.dnxruntimes clr-x64-dev
       1.0.0-dev         clr     x86          C:Usersvictorhu.dnxruntimes clr-x86-dev
       1.0.0-dev         coreclr xd64         C:Usersvictorhu.dnxruntimes coreclr-x64-dev
       1.0.0-dev         coreclr x86          C:Usersvictorhu.dnxruntimes coreclr-x86-dev
       1.0.0-dev         mono                 C:Usersvictorhu.dnxruntimes mono-dev

There is an extensive wiki page explaning the DNX structure for more. @Will points out the ASP.NET docs page as well.

 
精彩推荐