无法在 dotnet core 3.1 中发布单个自包含文件 [英] Cannot publish single self-contained file in dotnet core 3.1
本文介绍了无法在 dotnet core 3.1 中发布单个自包含文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想第一次尝试 .net core,所以我下载了新发布的 .net core 3.1 lts.我需要发布一个独立的文件,但它不起作用.既不是通过 VS 的 gui 也不是通过命令行
I want to try out .net core for the first time, so I downloaded the newly released .net core 3.1 lts. I need to publish a single self-contained file but it doesn't work. Neither via the gui of VS nor via the command line
dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true
部署是独立的,是的,但它包含 200 多个文件而不是 1 个.
the deployment is self-contained, yes, but it contains 200+ files and not 1.
推荐答案
独立的单个可执行文件位于/publish 子文件夹中.我的错,很抱歉没有充分欣赏生成的输出.
The self-contained single executable is located in the /publish subfolder. My bad, apologies for not appreciating the generated output sufficiently.
这篇关于无法在 dotnet core 3.1 中发布单个自包含文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文