Important - NCover 1.5.5 Duplicate Module / Sequence Points
Important - NCover 1.5.5 Duplicate Module / Sequence Points
To save me continually repeating myself on multiple threads to various people and likewise others getting frustrated I'll repeat one more time here in the hope people read this first.
As Peter indicated on his blog, while NCover 1.5.5 solves some problems people were having in NCover 1.5.4, it unfortunately added some new ones - such as it does not work with .Net 1.0/1.1 applications. However there is another problem that when occurring screws up the integrity of your coverage results.
The problem is to caused by assemblies being loaded in multiple AppDomains, as can happen for instance when using TestDriven.Net or indeed unit tests creating and utilising domains. NCover will create a "duplicate" <module> section in the coverage xml for each time the assembly is loaded with the visit counts, which NCoverExplorer does it's best to merge together to give a consolidated view of coverage.
In NCover 1.5.4 this worked without a problem. However with NCover 1.5.5 Peter added a new feature to remove no-op instructions. The problem is that in some circumstances NCover 1.5.5 is not consistently removing these instructions - it noticeably occurs when the same module appears multiple times in a coverage file from being in different domains.
This in turn causes problems for a downstream application like NCoverExplorer trying to merge the methods back together again. NCover currently creates no unique guid for each method in the coverage file, so NCoverExplorer tries to simulate one by a combination of things including the start and end line number. This clearly goes wrong when within a coverage file the same method is reported as starting on line 19 in one module section and line 20 in the next. Hence you will see duplicate nodes in the tree and have corrupted coverage statistics.
So - we know there is a problem and hopefully Peter can resolve it when he finds some more "NCover" time.
In the meantime I strongly recommend that you instead use NCover 1.5.4 which does not suffer from this problem rather than 1.5.5.
Re: NCover and Web Application using ASP.Net ...
bump for answers
Re: NCover and Web Application using ASP.Net ...
If you look back through the threads on this forum (look for older than 3 months) you should find some examples. Google should be able to help too.
You could also try the FAQ for the next NCover version which may have some useful tidbits - temporarily hosted at the link below:
http://www.kiwidude.com/dotnet/NCoverFAQ.html