Good morning guys
I am using coverlet to run my tests in TeamCity. This works fine after I run the tests I would like to generate the report.
Write-Host "Installing report generator" -ForegroundColor Green -BackgroundColor White
dotnet tool install --tool-path tools dotnet-reportgenerator-globaltool
Write-Host "Finished installic report generator" -ForegroundColor Green -BackgroundColor White
reportgenerator "-reports:$filesString" "-targetDir:$targetDir"
Above solution is working locally however in TeamCity I have following error:
reportgenerator : The term 'reportgenerator' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Any ideas what I am missing?
You are installing ReportGenerator to the
toolsfolder.Executing it with
tools\reportgeneratorshould work for you.You may have a look at the "Readme" tab here: https://www.nuget.org/packages/dotnet-reportgenerator-globaltool/5.0.0
It shows 3 different installation options and the corresponding command to run ReportGenerator as a global tool
This is not specific to ReportGenerator. Every global tools has the same behavior.