发布代码覆盖率中的错误导致azure devops



我在azure devops 中的管道中发布代码覆盖率结果时出现此错误

未能生成Html报告。错误:1

你能帮我吗??

这是我的发布代码覆盖率结果

发布代码覆盖率结果图片

这是我的日志

==============================================================================
"C:Program Filesdotnetdotnet.exe" C:Azure DevOps Agentagent prod_work_tasksPublishCodeCoverageResults_2a7ebc54-c13e-490e-81a5-d7561ab7cd971.160.3netcoreapp2.0ReportGenerator.dll -reports:**/testresults/coverage/code-coverage.xml -targetdir:C:Azure DevOps Agentagent prod_work_tempcchtml -reporttypes:HtmlInline_AzurePipelines
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but dotnet-C:Azure does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
##[warning]Failed to generate Html report. Error: 1
Reading code coverage summary from 'C:Azure DevOps Agentagent prod_work3stestresultscoveragecode-coverage.xml'
Async Command Start: Publish code coverage
Publishing coverage summary data to TFS server.
Lines- 0 of 0 covered.
Branches- 0 of 0 covered.
Modifying Cobertura Index file
Publishing code coverage files to TFS server.
Uploading 1 files
File upload succeed.
Published 'C:WindowsServiceProfilesNetworkServiceAppDataLocalTempCode Coverage Report_374' as artifact 'Code Coverage Report_374'
Async Command End: Publish code coverage
Finishing: Publish code coverage from **/testresults/coverage/code-coverage.xml

这是我的代码平均.xml路径

code-coverage.xml路径图片

许多路径可能没有像那样的caution" or '

"C:Program Filesdotnetdotnet.exe" C:Azure DevOps Agentagent prod_work...

或hier-targetdir:C:Azure DevOps Agentagent prod_work_tempcchtml

这让我想到,是你日志中的错误消息:* You intended to execute a .NET program, but dotnet-C:Azure does not exist.从这个dotnet-C:Azure我假设,因为路径中的空间它认为你提供了一个参数。

正确的调用应该是这样的:-targetdir: "C:Azure DevOps Agentagent prod_work_tempcchtml"

相关内容

  • 没有找到相关文章

最新更新