使用自包含框架时,dot net core 3.1 的设置 CI 构建配置失败

Posted

技术标签:

【中文标题】使用自包含框架时,dot net core 3.1 的设置 CI 构建配置失败【英文标题】:Setup CI build configuration for dot net core 3.1 failed while using self contained framework 【发布时间】:2020-06-15 11:38:24 【问题描述】:

我们如何在 dot net core 3.1 的管道中设置构建配置?无法使用自包含框架 --self contained true -r linux-x64 从 azure 门户的部署中心设置 3.1 我们收到以下错误错误:

The process 'C:\hostedtoolcache\windows\dotnet\dotnet.exe' failed with exit code 1.

请提出建议。谢谢。

【问题讨论】:

【参考方案1】:

像这样试试。

dotnet publish -r linux-x64 -c Release /p:PublishSingleFile=true

还有依赖修剪

dotnet publish -r linux-x64 -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true

【讨论】:

以上是关于使用自包含框架时,dot net core 3.1 的设置 CI 构建配置失败的主要内容,如果未能解决你的问题,请参考以下文章