How to Create Framework-Dependent Executables with .NET Core 2.2

。_饼干妹妹 提交于 2019-12-21 09:18:22

问题


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:

Framework-dependent executables (FDE)

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.

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


回答1:


.NET Core 2.2

The way to do this is to specify a runtime identifier and then --self-contained false:

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

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


来源:https://stackoverflow.com/questions/54075591/how-to-create-framework-dependent-executables-with-net-core-2-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!