如何使用.NET Core 2.2创建框架相关的可执行文件 [英] How to Create Framework-Dependent Executables with .NET Core 2.2

查看:106
本文介绍了如何使用.NET Core 2.2创建框架相关的可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用.NET Core 2.2创建框架相关的可执行文件(FDE)? MSDN文档在此处提及了它们,并将其作为.NET Core的新功能。 2.2:

How do I create framework-dependent executables (FDE) with .NET Core 2.2? The MSDN documentation mentions them here as a new feature for .NET Core 2.2:


与框架相关的可执行文件(FDE)

Framework-dependent executables (FDE)

从.NET开始在Core 2.2中,您
可以将您的应用程序以及所有必需的第三方
依赖项作为FDE进行部署。您的应用将使用在目标系统上安装的
版本的.NET Core。

Starting with .NET Core 2.2, you can deploy your app as an FDE, along with any required third-party dependencies. Your app will use the version of .NET Core that's installed on the target system.

逐步步骤示例仍然仅涉及独立且与框架相关的部署(FDD)。

Sadly the step-by-step examples still only refer to self-contained and framework-dependent deployments (FDD).

推荐答案

.NET Core 2.2



执行此操作的方法是指定运行时标识符,然后-自包含的假

dotnet publish -c Release -r win-x64 --self-contained false

这将生成不包含整个.NET Core框架的可执行文件。

This will generate an executable without including the whole .NET Core framework.

对于.NET Core 3.0,可以使用以下内容:

For .NET Core 3.0 the following can be used:

dotnet publish -c Release -r win-x64 --no-self-contained

这篇关于如何使用.NET Core 2.2创建框架相关的可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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