-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MS CodeCoverage + SourceLink + ReportGenerator = No Code Coverage Report #141
Comments
@rainman-63 thanks for reporting this. ReportGenerator works good with You can also try to use: @fhnaseer could you please add |
I see the same issue with my bat file here: https://github.com/jbe2277/waf/blob/34629b5f4a9d83d320050fa0b8b4da0528b07fd5/build/BuildRelease.bat Output of
I'm using the latest version of |
Is there any documentation or guidance outlining when paths are normalized or not? We're seeing an issue where we enabled ContinuousIntegrationBuild=true and the following happened: Repository 1: Repository 2: We didn't go out of our way to enable source linking at all, so we're a bit confused on what could have happened and trying to track down the discrepancies. Edit: It looks like upgrading from an older Microsoft.CodeCoverage version to the latest (17.12.0) fixed the case where Repository 1 had normalized paths on Linux. |
@Cjewett I have added documentation for DeterministicReport https://github.com/microsoft/codecoverage/blob/main/docs/configuration.md @jbe2277 I see that you are using |
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
The text was updated successfully, but these errors were encountered: