Exception "An item with the same key has already been added" for an Opencover XML input (attached)
description
Here the complete output:
================
Loading report 'C:\Projects\parallel-tasks-simulator\NUnitTestCoverage.xml'
Initiating parser for OpenCover
Current Assembly: Lua4Net
Current Assembly: ParallelTasksSimulator.Core.Tests
Current Assembly: Lua4Net.Tests
Current Assembly: ParallelTasksSimulator.Core
Current Assembly: ParallelTasksSimulator.GtkUI.Tests
Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.ArgumentException: An item with the same key has already been
added.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1
comparer)
at Palmmedia.ReportGenerator.Parser.OpenCoverParser.<>c__DisplayClass10.<.ctor>b__4(String assembly)
at System.Threading.Tasks.Parallel.<>c__DisplayClassf`1.<ForWorker>b__c()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass7.<ExecuteSelfReplicating>b__6(Object )
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action
`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bod
yWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, Action`1 body)
at Palmmedia.ReportGenerator.Parser.OpenCoverParser..ctor(XContainer report)
at Palmmedia.ReportGenerator.Parser.ParserFactory.GetParsersOfFile(String reportFile)
at Palmmedia.ReportGenerator.Parser.ParserFactory.CreateParser(IEnumerable`1 reportFiles)
at Palmmedia.ReportGenerator.Program.Main(String[] args)
I used OpenCover version 2.1.25.