English 中文(简体)
How do I fix a NCover "Duplicate method was added" error
原标题:

Having performed some refactoring I am now finding that NCoverExplorer is unable to merge my test results. With NCover and NCoverExplorer v3.2.2 the merge appeared to work, but NCoverExplorer would fail to open the merged file with an error suggesting that the file didn t exist or couldn t be opened (which it did and could).

So I tried with NCover 1.5.8 and I get the following, more helpful error from NCoverExplorer 3.2.2 when it tries to merge the files:

NCoverExplorer.Console Complete v3.2.2 x86 (Administrator)
(c) 2007 - 2009 Gnoso Inc.
http://www.ncover.com/

Processing report settings from the command line.

-- Top-level exception (System.Exception)
An error occurred while loading your coverage file: Duplicate method was added.
-- Stack Trace
   at NCover.Framework.Reports.ReportingProcessor.CreateCoverageView(List`1 filenames, ICoverageReportSettings sett)
   at NCover.Framework.Reports.ReportingProcessor.Process()
   at NCoverExplorer.Console.EntryPoint.Main(String[] args)
-- Inner exceptions
Duplicate method was added.
-- Stack Trace
   at NCover.Framework.Models.NCover2.NCover2CoverageClass.CreateMethod(String name, String signature, Int32 cyclomaticComplexity, Boolean doNotAppend)
   at NCover.Framework.Models.NCover2.NCover2CoverageClass.CreateMethod(String name, String signature, Int32 cyclomaticComplexity)
   at NCover.Framework.Models.Merge.MergeCoverageModel.ProcessMethods(ICoverageModelClass destClass, ICoverageModelClass sourceClass, Dictionary`2 documentMa
p, Boolean isMerge)
   at NCover.Framework.Models.Merge.MergeCoverageModel.ProcessClasses(ICoverageModelModule destModule, ICoverageModelNamespace destNs, ICoverageModelNamespac
e sourceNs, Dictionary`2 documentMap, Boolean isMerge)
   at NCover.Framework.Models.Merge.MergeCoverageModel.ProcessNamespaces(ICoverageModelModule destModule, ICoverageModelModule sourceModule, Dictionary`2 doc
umentMap, Boolean isMerge)
   at NCover.Framework.Models.Merge.MergeCoverageModel.ProcessModules(ICoverageModel model, Dictionary`2 documentMap, Boolean isMerge)
   at NCover.Framework.Models.Merge.MergeCoverageModel..ctor(ICoverageModel model, MergeFilterMode mode)
   at NCover.Framework.Utilities.CoverageLoader.Merge(ICoverageView originalView, List`1 paths, MergeFilterMode mode)
   at NCover.Framework.Utilities.CoverageLoader.Merge(List`1 paths, MergeFilterMode mode)
   at NCover.Framework.Reports.ReportingProcessor.CreateCoverageView(List`1 filenames, ICoverageReportSettings sett)


Exiting with return code: 2

How do I go about resolving this error? The clues are there - seeing the name and signature parameters to CreateMethod() would probably help a lot.

最佳回答

This bug has been fixed in the most recent (unreleased) version. If you email NCover support (http://www.ncover.com/support) they ll send you a fix.

问题回答

暂无回答




相关问题
Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How do I compare two decimals to 10 decimal places?

I m using decimal type (.net), and I want to see if two numbers are equal. But I only want to be accurate to 10 decimal places. For example take these three numbers. I want them all to be equal. 0....

Exception practices when creating a SynchronizationContext?

I m creating an STA version of the SynchronizationContext for use in Windows Workflow 4.0. I m wondering what to do about exceptions when Post-ing callbacks. The SynchronizationContext can be used ...

Show running instance in single instance application

I am building an application with C#. I managed to turn this into a single instance application by checking if the same process is already running. Process[] pname = Process.GetProcessesByName("...

How to combine DataTrigger and EventTrigger?

NOTE I have asked the related question (with an accepted answer): How to combine DataTrigger and Trigger? I think I need to combine an EventTrigger and a DataTrigger to achieve what I m after: when ...

热门标签