.NET Core 应用程序是否需要在目标计算机上安装 .NET 运行时? [英] Do .NET Core apps require the .NET runtime installed on the target machine?

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

问题描述

在这个视频中,Scott Hanselman 采访了一位来自 ASP.NET 团队的家伙.他说,在 .NET Core 之上的 ASP.NET 5 的目标之一是应用程序不会依赖于托管服务器上的 .NET Framework 和 GAC 程序集.相反,.NET Core 库将通过 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.

这样做的一个原因是 Microsoft 可以快速发布错误修复或新功能,而我们不必等到新版本(完整框架的)安装到我们的托管环境中.

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 Core 构建的应用是否真的独立于目标机器上安装的 .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 core 应用程序要求您在希望运行该应用程序的机器上安装 .net core.但是,有一种方法可以通过发布自包含应用程序来避免这种情况.您可以发布包含必需版本的 .net 核心的应用程序.这将使您的应用程序更大,但如果您只需要在一台机器上运行一个应用程序来运行 .net,您需要特定版本的 .net,或者您想制作一个可移植的应用程序,这是一个不错的选择.

A normal .net core app requires that you install .net core on the machine you wish to run the application on. There is a way to avoid this however, by publishing a self contained app. You can publish your app with the requisite version of .net core included. This will make your app larger, but if you only need one application on a machine to run .net, you need a specific version of .net, or you want to make a portable application, this is a good choice.

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

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