2

我能够在 DotCover 的帮助下生成 HTML 报告,并使用“/d:sonar.cs.dotcover.reportsPaths=.\dotCover\dotCoverResults.html”将其传递给 Sonarqube(dotcover html 中有覆盖数据)。在声纳日志中,我没有看到任何错误消息,但声纳仪表板显示没有覆盖;它是空白的。另一个应用程序的类似配置在其他应用程序中工作得非常好,但在这个应用程序中却不行。Blow 是 Jenkins 中为此使用的配置。

Sonarqube 版本:4.5.7 MSBuild SonarQube Runner:2.0 C#:5.2

dotnet restore --configfile .\.nuget\NuGet.Config
MSBuild myApplication.sln /t:Clean /t:Rebuild /p:Configuration=Debug /p:Platform=x64
nunit3-console.exe test\UnitTests\bin\Debug\net461\UnitTests.dll --result=nunit-test-results.xml;format=nunit2 --labels=On
dotCover.exe analyse .\dotCover\coverageDebug.xml

任何帮助是极大的赞赏。

4

0 回答 0