Open rainman-63 opened 1 week ago
@rainman-63 thanks for reporting this. ReportGenerator works good with /_/
we are using it in our pipelines. You can maybe try to upgrade ReportGenerator in your pipeline and/or provide argument -sourcedirs
.
You can also try to use: <Configuration><DeterministicReport>False</DeterministicReport></Configuration>
in your configuration to try to resolve those paths. I think you need to upgrade Microsoft.CodeCoverage
package to latest in your project to take effect.
@fhnaseer could you please add DeterministicReport
option to our public documentation?
When using MS CodeCoverage with SourceLink (Microsoft.SourceLink.GitHub in this case), and setting the ContinuousIntegrationBuild element in the csproj to true, the output reports will have the file path removed from the filename attributes.
Using SourceLink will cause the PDB to be altered, adding the CustomDebugAttribute and removing part of the file paths to be replaced with
/_
, which will result in the following code coverage report:Tooling like ReportGenerator use the filename to access the file to build the code coverage report, but no such file path exists on the local machine for
/_/src/NoCodeCoverage/MyMath.cs
.Other tooling like coverlet do not seem to have the same issue when using SourceLink.
I've attached a sample application that will exhibit the issue, it just needs to be setup with a git repo. NoCodeCoverage.zip
Thanks,
Raymond