【问题标题】:Run a prerelease version of DotNetCoreCLI in Azure Pipelines在 Azure Pipelines 中运行预发布版本的 DotNetCoreCLI
【发布时间】:2019-12-24 02:43:29
【问题描述】:

在编写 Azure Pipelines yaml 脚本时,是否可以运行 DotNetCoreCLI 任务的预发布版本?如果可能的话,我想使用 3.0.1xx 来利用 dotnet tool update installing the tool rather than throwing an error if not installed。

如果可能的话,使用预发布版本而不是版本 2 进行这样的调用的语法是什么:

- task: DotNetCoreCLI@2
  continueOnError: true
  inputs:
    command: custom
    custom: tool
    arguments: install -g coverlet.console
  displayName: Install Coverlet tool. This task will continue on error if coverlet is already installed.

【问题讨论】:

标签: azure-devops yaml version azure-pipelines dotnetcorecli


【解决方案1】:

您可以使用以下内容:

steps:
- task: UseDotNet@2
  displayName: 'Use .NET Core sdk'
  inputs:
    packageType: sdk
    version: 3.0.101
    installationPath: $(Agent.ToolsDirectory)/dotnet

可能的版本:https://github.com/dotnet/core/blob/master/release-notes/releases-index.json

阅读:https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/dotnet-core-tool-installer?view=azure-devops

【讨论】:

  • UseDotNet 和 DotNetCoreInstaller 任务有何不同?是否只有UseDotNet 更改DotNetCoreCLI 任务的版本?
  • 您在哪里看到DotNetCoreInstaller 任务?您正在使用 dotnetcorecli 任务,它只是使用特定命令调用 dotnet,而在安装特定版本的 cli 的命令之前需要此命令
  • 我正在使用DotNetCoreInstaller 任务来安装v2.2,所以想知道使用DotNetCoreInstaller 或UseDotNet 是否对cli 很重要。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2022-07-08
  • 1970-01-01
  • 1970-01-01
  • 2021-08-09
  • 2019-12-13
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多