做.NET核心应用程序可能需要安装在目标机器上的.NET运行时? [英] Do .NET Core apps require the .NET runtime installed on the target machine?

查看:363
本文介绍了做.NET核心应用程序可能需要安装在目标机器上的.NET运行时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此影片,斯科特Hanselman的访谈小伙从ASP.NET团队。他说,中ASP.NET 5的目标之一,.NET的核心之上,是该应用程序将不依赖于宿主服务器上的.NET Framework和GAC组件。相反,.NET核心库将通过的NuGet包发布和应用程序将与它们的依赖进行部署。

In this video, Scott Hanselman interviews a guy from the ASP.NET team. He says that one of the goals of ASP.NET 5, on top of .NET Core, is that the apps won't depend on the .NET Framework and GAC assemblies on the hosting server. Instead, .NET Core libraries will be released via NuGet packages and apps will be deployed with their dependencies.

其中的一个原因是这样微软可以快速释放错误修复或新功能,我们不必等到(完整框架)的新版本安装在我们的托管环境。

One of the reasons for this is so Microsoft can quickly release a bug fix or new feature, and we don't have to wait until the new version (of the full framework) is installed on our hosting environment.

我的问题是:

是建立在真正独立的安装在目标机器上的.NET版本.NET核心的应用程序,并且可以不用他们安装了.NET Framework甚至可以运行?

Are the apps built on .NET Core really independent of the version of .NET installed on the target machine, and can they run even without the .NET Framework installed?

推荐答案

是的,你在你的应用程序中使用的架构是完全独立安装在目标服务器上的.NET Framework,因为核心的.NET Framework通过引用的NuGet 包,且能够通过的 DNX实用,特别是你感兴趣的将是 DNU发布命令。

Yes, the framework you use in your application is completely independent of the .NET Framework installed on the target server, because the Core .NET Framework is referenced via NuGet packages and can be bundled up for deployment via the DNX Utility, specifically of interest to you will be the dnu publish command.

下面是摘录,描述什么 DNU发布所做的:

Here is an excerpt, describing what dnu publish does:

发布( DNU发布

在发布命令将应用程序打包成可以推出一个自包含的目录。这将创建下列目录结构:

The publish command will package your application into a self-contained directory that can be launched. It will create the following directory structure:


  • 输出/

  • 输出/包

  • 输出/的appName

  • 输出/ commandName.cmd

该包目录包含所有的应用程序需要运行的程序包。

The packages directory contains all the packages your application needs to run.

本的appName目录将包含所有的应用程序code,如果你有项目引用它们将作为在这个水平,以及自己的目录与code。

The appName directory will contain all of your applications code, if you have project references they will appear as their own directory with code at this level as well.

因此​​,.NET的核心将存在于输出/包目录,将不需要在目标服务器上安装。

So the .NET Core will exist in the output/packages directory and will not need to be installed on the target server.

这篇关于做.NET核心应用程序可能需要安装在目标机器上的.NET运行时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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