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

问题描述 投票:0回答:1

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

之前用了不到8分钟,用的是Dot Net6。升级到 dot net 7 后需要 50 多分钟,如果 60 分钟内没有完成,大多数情况下它会失败

项目类型:Blazor WebAssembly DotNet 托管

框架:.NET 7

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

Yaml 用于发布步骤:

#Your build pipeline references an undefined variable named ‘BuildConfiguration’. 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

steps:
- task: DotNetCoreCLI@2
  displayName: Publish
  inputs:
    command: publish
    publishWebProjects: false
    projects: '**/Server/Agfund.Server.csproj'
    arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)'
    zipAfterPublish: True

优化文件集太慢

azure-pipelines blazor-webassembly azure-pipelines-build-task .net-7.0
1个回答
0
投票

现在有点变通/破解,但如果您在 Azure 管道中使用 jobs,您可以将

timoutInMinutes
属性设置为大约 200 分钟。

jobs:
- job: build_blazor_ui
  timeoutInMinutes: 200

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

© www.soinside.com 2019 - 2024. All rights reserved.