question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet test with coverlet failed when UseSourceLink

See original GitHub issue

SonarSource/sonar-scanner-msbuild#756 My repo: https://github.com/iron9light/HOCON.Json It CI with Azure pipelines. When I add /p:UseSourceLink=true for dotnet test, it will not generate valid coverage file (opencover format) (sonar cannot get coverage info from the output coverage file). When removed /p:UseSourceLink=true everything works fine. coverlet.msbuild version: 2.6.3

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:20

github_iconTop GitHub Comments

2reactions
iron9lightcommented, Jul 3, 2019

The version file is generated by Nerdbank.GitVersioning.

1reaction
MarcoRossignolicommented, Nov 5, 2019

@vchirikov one idea…can you try to exclude autogenerated file with filter? https://github.com/tonerdo/coverlet/issues/482#issuecomment-508080869 https://github.com/tonerdo/coverlet/blob/master/Documentation/MSBuildIntegration.md#source-files

for instance /p:ExcludeByFile=\"**/*Json.Version.cs\"

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet test with coverlet failed when UseSourceLink #482
It CI with Azure pipelines. When I add /p:UseSourceLink=true for dotnet test, it will not generate valid coverage file (opencover format) (sonar ...
Read more >
Dotnet test coverage shows as 0% - Sonar Community
Hello, We are using : SonarQube Developer Version : 9.4.0.54424 We have noticed that coverage report for all the repositories shows as 0.0%....
Read more >
Is it possible to get Code Coverage of .NET Framework ...
Prepared a webform app and .net framework unit test, added the coverlet.runsettings file in repo, the content refering Coverlet options ...
Read more >
mirrors_DataDog/coverlet
Tests fail if assembly is strong named. Affected drivers: all drivers. Symptoms: Running coverage on .NET Framework runtime(i.e. .NET 4.6.1) and get error...
Read more >
Is it possible to get Code Coverage of .NET Framework Project ...
Coding example for the question Is it possible to get Code Coverage of .NET Framework Project using coverlet in Azure DevOps?-C#.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found