microsoft/codecoverage

Azure DevOps pipeline breaks as new version of dotnet-coverage tool is published

Kralizek opened this issue · 1 comments

Description

I have the dotnet-coverage tool installed locally and configured in the dotnet-tool.json file and I use dotnet tool restore to restore all the tools in the pipeline.

As per the title, as soon as a new version is pushed to NuGet, my builds fail.

I had this issue when the 17.9.1 was pushed and I opened this issue microsoft/azure-pipelines-agent#4472

The issue was solved by changing the dotnet-tool.json to point to the latest version.

{
  "version": 1,
  "isRoot": true,
  "tools": {
    "dotnet-coverage": {
      "version": "17.9.1",
      "commands": [
        "dotnet-coverage"
      ]
    }
  }
}

Today, a new version was pushed, 17.9.3, and the build failed again.

I don't think this is the expected behavior, hence the issue.

Configuration

I use .NET SDK 8 RC2

Regression?

It's a new project started after 17.8.6 was pushed to NuGet.

Other information

Everything works fine on my local machine but fails on Azure DevOps pipeline using default agent and ubuntu-latest.

I posted the same issue in dotnet/core as dotnet/core#8844

I think this is some issue on dotnet side. I don't understand why you see such behavior. You can install this tool in pipeline using:

- task: DotNetCoreCLI@2
  inputs:
    command: 'custom'
    custom: "tool"
    arguments: 'install -g dotnet-coverage'
  displayName: 'install dotnet-coverage'

Full example: https://github.com/microsoft/codecoverage/blob/main/samples/Calculator/scenarios/scenario08/README.md