I am doing some modifications on OpenCover and NUnit to suit my needs.
Briefly, I want to get coverage information even when shadow-copy is enabled in Nunit. However, OpenCover is unable to track an assembly when the pdb file is absent. When shadow-copy is enabled in NUnit, the assembly under test is copied to a shadow directory and OpenCover fails to find the corresponding pdf file.
At first, I thought that .Net Runtime just didn't copy pdb files to shadow directory. But After I investigated this problem further, I found out Runtime will copy pdb files but not the same time when assemblies are copied.
My understanding now is that Runtime will first copy assemblies to shadow directories. And then those assemblies will be loaded and Opencover is notified. OpenCover find out that there are no pdb files, so these assemblies are ignored. Sometime later, pdb files are copied, but OpenCover failed to notice this fact thus failed to track these assemblies.
So my question is what is the exact time that .Net Runtime copies pdb files to shadow directories? And is it possible that I modify OpenCover so that it will be able to track these shadow-copied assemblies?