0

my Azure Pipeline keeps using an old version of ReportGenerator even after installing the latest version in the YAML script.

  1. I have an application on Net6 that uses the nuget package coverlet.collector version 3.1.2.

  2. I have a yaml pipeline that has the following blocks:

    • -script: dotnet tool install --ignore-failed-sources -g dotnet-reportgenerator-globaltool --version 5.1.17
    • -task: DotNetCoreCLI@2 inputs: command: 'test' projects: '**/*Tests.csproj' arguments: '--configuration $(buildConfiguration) --collect:"XPlat Code Coverage"'
    • -task: PublishCodeCoverageResults@1 inputs: codeCoverageTool: 'Cobertura' summaryFileLocation: '$(Agent.TempDirectory)/*/coverage.cobertura.xml'
  3. When I run the pipeline, it uses ReportGenerator 4.6.1.0 instead of the installed 5.1.17

How do I fix this?

Expected:

  • Uses ReportGenerator 5.1.17.0 (Screenshot is from my local machine after running Code Coverage) enter image description here

Actual:

  • Uses ReportGenerator 4.5.1.0 (Screenshot is from Azure Devops after running the yaml script) enter image description here
Glynn Bacanto
  • 439
  • 2
  • 6
  • 12
  • 1
    Have you tried using [ReportGenerator@5](https://marketplace.visualstudio.com/items?itemName=Palmmedia.reportgenerator) task? That should solve your issue – Sibtain Feb 21 '23 at 08:06

0 Answers0