Please provide the following information when submitting an issue.
Where appropriate replace the [ ] with a [X]
My Framework
My Environment
I have already...
My issue is related to (check only those which apply):
Expected Behavior
I have a build which produces portable PDBs, which are not supported by OpenCover 4.6.519. To work around this limitation, I used pdb2pdb to convert the portable PDBs to Windows PDBs, and then used the -searchdirs flag to pass the directory containing the converted files to OpenCover.
I expected OpenCover to locate the converted Windows PDBs and use them during the coverage analysis.
Actual Behavior
OpenCover reports that the PDBs for the assemblies using portable PDBs during the build are missing. Deleting the portable PDBs (after conversion to Windows PDBs, but before running OpenCover) appears to resolve the problem. As best I can tell, OpenCover only tries once to locate the PDB; if the file is found with the expected name but fails to load, it does not continue looking in searchdirs paths for other files which may successfully load.
On further investigation, it appears that a PDB in searchdirs is only considered if the original assembly appears in the same directory. This doesn't work well for relocated PDBs. In all I needed to apply the following workarounds:
- During PDB conversion, I had to copy the original assembly to the temporary directory containing PDBs.
- I had to delete the original portable PDBs or the converted PDBs were never checked.
Steps to reproduce the problem:
DotNetAnalyzers/StyleCopAnalyzers#2627
Please provide the following information when submitting an issue.
My Framework
My Environment
I have already...
My issue is related to (check only those which apply):
Expected Behavior
I have a build which produces portable PDBs, which are not supported by OpenCover 4.6.519. To work around this limitation, I used pdb2pdb to convert the portable PDBs to Windows PDBs, and then used the
-searchdirsflag to pass the directory containing the converted files to OpenCover.I expected OpenCover to locate the converted Windows PDBs and use them during the coverage analysis.
Actual Behavior
OpenCover reports that the PDBs for the assemblies using portable PDBs during the build are missing. Deleting the portable PDBs (after conversion to Windows PDBs, but before running OpenCover) appears to resolve the problem. As best I can tell, OpenCover only tries once to locate the PDB; if the file is found with the expected name but fails to load, it does not continue looking in
searchdirspaths for other files which may successfully load.On further investigation, it appears that a PDB in
searchdirsis only considered if the original assembly appears in the same directory. This doesn't work well for relocated PDBs. In all I needed to apply the following workarounds:Steps to reproduce the problem:
DotNetAnalyzers/StyleCopAnalyzers#2627