无法从Azure DevOps将dotnet 3.0.100应用程序推送到Octopus

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

我正在使用DevOps管道将我的dotnet构建推送到Octopus云实例。

在我将dotnet SDK 3安装程序添加到devops管道之前,它工作正常,>

- task: UseDotNet@2
  displayName: 'Install .net core 3.0.100'
  inputs:
    packageType: sdk
    version: '3.0.100'
    installationPath: $(Agent.ToolsDirectory)/dotnet

我的azure-pipelines.yml的章鱼部分看起来像这样:

- task: OctoInstaller@4
  inputs:
    version: 'latest'

- task: OctopusPush@4
  inputs:
    OctoConnectedServiceName: 'XXX.octopus.app'
    Space: 'Spaces-1'
    Package: '$(Build.ArtifactStagingDirectory)/$(Build.DefinitionName).$(Build.BuildNumber).zip'
    Replace: 'false'

我已经尝试过可以想到的OctoInstaller的每种组合,包括嵌入式和显式版本号。我一直通过@ 4收到此错误消息。

Failed to push package. The Octo command line tool is too old to run this task. Please use version 6.10.0 or newer, or downgrade the task to version 3.*.

使用OctoInstall @ 3时出现另一个错误:

Failed to push package. The process '/opt/hostedtoolcache/dotnet/dotnet' failed with exit code 150

有人能够通过章鱼部署使用dotnet 3吗?一种选择可能是为dotnet安装octo扩展程序,但我不确定如何您可以从蔚蓝管道中进行操作。或使用Windows版本而不是Ubuntu。

我也注意到构建步骤中的错误。

The specified framework 'Microsoft.NETCore.App', version '2.0.0' was not found.
  - The following frameworks were found:
      3.0.0 at [/opt/hostedtoolcache/dotnet/shared/Microsoft.NETCore.App]

这意味着章鱼必须尝试使用​​dotnet 2框架。

我正在使用DevOps管道将dotnet构建推送到Octopus云实例。在我将dotnet SDK 3安装程序添加到devops管道之前,它一直工作良好-任务:UseDotNet @ 2 displayName:'...

.net-core azure-devops octopus-deploy .net-core-3.0
2个回答
1
投票

仔细查看日志后,我发现OctopusPush失败,因为它依赖于dotnet 2.0.0。我添加了yml任务来安装该框架,现在它将推送到章鱼。


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