2

In our output tree, the Test directory only contains symbolic links (Win7 x64) pointing to DLLs in various build directories. Next to each of these DLLs in the actual build directory is a corresponding PDB file. However, when running OpenCover on the DLL in the Test directory, it ends with "No results - no assemblies that matched the supplied filter were instrumented this could be due to missing PDBs for the assemblies that match the filter please review the output file and refer to the Usage guide (Usage.rtf)"

The command line I'm using is:

D:\tools\opencover.4.5\OpenCover.console -target:d:\tools\nunit-2.5.10\nunit-console.exe -targetargs:"d:\temp\Test\Test.Mixed.dll /nologo /noshadow  /labels /xml=d:\temp\Test\output\Test.Mixedatp_results.xml" -output:d:\temp\Test\Results\coverage\Test.Mixed.xml -filter:+[*]* -register:user

If I copy the applicable PDB into the Test directory, then the coverage does work. Is there a way to get this working with the symbolic links?

Thanks.

Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575
elora
  • 451
  • 1
  • 3
  • 14

1 Answers1

0

Try using the -targetdir: argument to point to a folder where the binaries+pdbs are located i.e. your symlink folder?

Shaun Wilde
  • 8,228
  • 4
  • 36
  • 56
  • Does this argument do a recursive search? To be precise, if I have a folder with multiple test projects like testProject/Test1/bin/release and testProject/Test12/bin/release, can I just reference the full path to testProject? – Vin Shahrdar Apr 22 '19 at 14:55
  • @VinShahrdar - We have since added a new argument `searchdirs` that allows you to supply multiple paths to look for PDBs – Shaun Wilde May 01 '19 at 10:40
  • When is `-searchdirs` argument required? Because I have noticed that sometimes if I don't provide this parameter, and provide multiple target dlls in the `-targetargs` parameter, OpenCover automatically detects the pdb files. I could be wrong though... – Vin Shahrdar May 01 '19 at 15:40