coverlet: dotnet test with coverlet failed when UseSourceLink
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
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 20
The version file is generated by Nerdbank.GitVersioning.
@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\"