danielpalme/ReportGenerator

Report generator is looking for dotnet even the artifact is Python code

hyousif-pkglobal opened this issue · 1 comments

Describe the bug
Report generator is configured to create report for a Python code, however, the Azure pipeline fails due to missing dotnet executable even though it is not required.

2023-09-14T15:38:19.5314570Z ##[section]Starting: reportgenerator
2023-09-14T15:38:19.5319335Z ==============================================================================
2023-09-14T15:38:19.5319510Z Task : ReportGenerator
2023-09-14T15:38:19.5319621Z Description : ReportGenerator converts coverage reports generated by coverlet, OpenCover, dotCover, Visual Studio, NCover, Cobertura, JaCoCo, Clover, gcov, or lcov into human readable reports in various formats.
2023-09-14T15:38:19.5320023Z Version : 5.1.25
2023-09-14T15:38:19.5320106Z Author : Palmmedia
2023-09-14T15:38:19.5320208Z Help : More Information
2023-09-14T15:38:19.5320342Z ==============================================================================
2023-09-14T15:38:19.9164577Z ##[error]Unable to locate executable file: 'dotnet'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
2023-09-14T15:38:19.9176742Z ##[section]Finishing: reportgenerator
To Reproduce
Azure pipeline task
- task: reportgenerator@5
inputs:
reports: 'coverage.xml'
targetdir: 'coveragereport'
sourcedirs: '$(System.DefaultWorkingDirectory)'
artifact: 'PythonCoverage'
disable.coverage.autogenerate: 'true'

  1. Console output of ReportGenerator: Azure devops pipeline

ReportGenerator depends on .NET.
That does not change, if your code base is written in Python.

If you use one of the default build agents (ubuntu-latest, windows-latest), the .NET SDK will already be available.
If you use a custom agent, you'll have to install the SDK yourself:

- task: UseDotNet@2
  inputs:
    version: 6.x