When trying to create a report using 'ReportGenerator' tool as part of Azure devops YAML pipleine, below error is being thrown though i installed the tool in previous step.
- script: dotnet tool install --global dotnet-reportgenerator-globaltool --version 4.6.1
displayName: 'Install ReportGenerator tool'
continueOnError: true
- script: reportgenerator "-reports:$(Agent.TempDirectory)/**/*.cobertura.xml" "-targetdir:$(Build.SourcesDirectory)/coverlet/reports" -reporttypes:Cobertura;htmlInline
displayName: Generate code coverage report
continueOnError: true
Error : 'reportgenerator' is not recognized as an internal or external command, operable program or batch file. ##[error]Cmd.exe exited with code '1'.
Adding logs Install Step: Script contents: dotnet tool install dotnet-reportgenerator-globaltool --tool-path tools --version 4.6.1 ========================== Starting Command Output =========================== "C:\windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "E:\Agent_work_temp\d9535a65-152b-4822-a4f2-7e58c11f2418.cmd"" You can invoke the tool using the following command: reportgenerator Tool 'dotnet-reportgenerator-globaltool' (version '4.6.1') was successfully installed. Finishing: Install ReportGenerator tool
Executing tool : Script contents: reportgenerator "-reports:E:\Agent_work_temp/**/*.cobertura.xml" "-targetdir:E:\Agent_work\79\s/coverlet/reports" -reporttypes:Cobertura;htmlInline ========================== Starting Command Output =========================== "C:\windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "E:\Agent_work_temp\53dbc699-e878-4458-aaf2-8e69e5c4f09a.cmd"" 'reportgenerator' is not recognized as an internal or external command, operable program or batch file. ##[error]Cmd.exe exited with code '1'.