将 blazor 项目升级到 .Net 7 后,.NET Core 发布任务变慢

Rub*_*esh 5 azure-pipelines-build-task azure-pipelines blazor-webassembly .net-7.0

将项目升级到 Dot Net 7 后,Azure Pipeline“.Net Core Publish”任务太慢。

\n

之前使用 Dot Net6 只花了不到 8 分钟。升级到 dot net 7 后需要 50 分钟以上,如果在 60 分钟内未完成,大多数情况下都会失败

\n

项目类型:Blazor WebAssembly DotNet 托管

\n

框架:.NET 7

\n

代理:windows-latest(也在ubuntu-latest中尝试过)

\n

在此输入图像描述

\n

用于发布步骤的 Yaml:

\n
#Your build pipeline references an undefined variable named \xe2\x80\x98BuildConfiguration\xe2\x80\x99. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972\n\nsteps:\n- task: DotNetCoreCLI@2\n  displayName: Publish\n  inputs:\n    command: publish\n    publishWebProjects: false\n    projects: \'**/Server/Agfund.Server.csproj\'\n    arguments: \'--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)\'\n    zipAfterPublish: True\n
Run Code Online (Sandbox Code Playgroud)\n

优化文件组件太慢

\n

在此输入图像描述

\n

小智 0

目前需要进行一些解决/破解,但如果您在天蓝色管道中使用作业,则可以将该timoutInMinutes属性设置为 200 分钟之类的值。

jobs:
- job: build_blazor_ui
  timeoutInMinutes: 200
Run Code Online (Sandbox Code Playgroud)

这并不能解决根本问题,但可以防止天蓝色管道超时。