NCover Documentation

Seeing duplicate modules in your merged coverage? It's likely that what you're experiencing is a result of covering the same code on different machines, and then trying to merge the results. The source of the issue has to do with the way NCover 3 tracks modules, etc. NCover does not use the module names themselves. Rather, the CLR provides a unique ID for each element when the code compiles. NCover utilizes these ids when reporting coverage.

More to the point, a machine provides a unique number for each module. When trying to merge coverage run on different machines, sometimes NCover 3 will miss that two modules are identical since their compiler-assigned ids are unique. To fix this problem, you will want to make sure that you run the same tests / coverage on your application on the same machine, merging the coverage on the same machine. That should resolve most discrepancies.

Another issue to watch out for is building the same code with two different build scripts and version numbers. This too will assign different identities to a single module. The key is to ensure that coverage on the same code happens on the same machine in the same build scenario.

(As a side note, NCover 4--in development--will do away with this limitation. Hope you're ready!)

If you still need technical assistance, we can help:

Submit A Support Ticket