使用自包含框架时,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 构建配置失败的主要内容,如果未能解决你的问题,请参考以下文章

AWS Lambda Dot Net Core 3.1 在使用 Aspose Cells for .Net 时抛出 gdip 异常

HTTP 错误 500.0 - Dot net core 3.1 中的 ASP.NET Core IIS 托管失败(进程中)

Dot Net Core dll 作为带有事件的 COM dll

Set-cookie 不适用于 Dot net Core 3.1 中的跨站点请求/响应和 React 设置同站点 cookie 和/或 CORS 问题

使用 Asp.NET Core 3.1 框架将文件上传到服务器时如何使用 IFormFile 作为属性?

Blazor ASP.Net Core 3.1 Web API 在发布时返回 404 错误