【问题标题】:Test Task Failing in Azure DevOpsAzure DevOps 中的测试任务失败
【发布时间】:2020-09-14 10:47:42
【问题描述】:

我在 Azure DevOps 中有一个构建管道,它具有以下任务并使用托管代理。

现在,当我运行它时,测试任务失败并显示以下消息。

Testhost process exited with error: It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '2.2.0' was not found.

如何在托管代理中安装 2.2.0 版?

【问题讨论】:

    标签: azure-devops


    【解决方案1】:

    您可以添加“使用 .NET Core”任务并指定要安装的 .NET Core SDK 或运行时版本。这是一个示例:

    - task: UseDotNet@2
      displayName: 'Use .NET Core runtime 2.2.0'
      inputs:
        packageType: runtime
        version: 2.2.0
    

    此外,我们已于 6 月 19 日弃用 Windows、Ubuntu 和 macOS 映像的 .NET Core 2.2。此更改是因为 .NET Core 的 2.2 版本已于 2020 年 1 月弃用。因为我们尝试仅保留非行尾版本(2.1、3.0 和 3.1)。您可以在此票证中找到更多详细信息:https://github.com/actions/virtual-environments/issues/975

    【讨论】:

      猜你喜欢
      • 2021-10-25
      • 2020-07-27
      • 2020-11-25
      • 2020-09-28
      • 2021-05-10
      • 2020-11-09
      • 1970-01-01
      • 2020-11-07
      • 1970-01-01
      相关资源
      最近更新 更多