-
Couldn't load subscription status.
- Fork 391
Description
Hello,
Our engineering team has a sizable .dll (***.netstandard.dll sorry the name is redacted for privacy) that we would like to instrument using the coverlet.console.exe. However after we create the .dll using MSBuild, we also repack the .dll with all of its dependencies into one .dll that we release to our customers. When instrumenting this .dll, we come across the following issue :
...
Unable to instrument module: C:\***\bin\Debug\netcoreapp3.1\***.netstandard.dll, pdb without local source files, [C:\Repos\HtmlAgilityPack\HtmlAgilityPack.Shared\crc32.cs]
Instrumented module: 'C:\***\bin\Debug\netcoreapp3.1\***CoreOperations.dll'
...
Our main .dll that we would like to instrument for code coverage cannot be instrumented because the .pdb file associated with the .dll contains references to the Html agility pack .dll (which can be found here : https://www.nuget.org/packages/HtmlAgilityPack/ we use version : 1.11.24) and the source code for this package cannot be found locally. However, for some reason this problem does not occur for us with our dependencies like NLog (which can be found here : https://www.nuget.org/packages/NLog/ , we use version : 4.7.7). Is there a way that we could repack our assembly so that all the required files are available?
Or, could we submit a PR to allow the option to skip verifying that all the source files referenced in a .pdb file are present? We were able to instrument ***.netstandard.dll and receive decent code coverage results by commenting out the use of the PortablePdbHasLocalSource function from the InstrumentationHelper.cs file.