Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

An item with the same key has already been added
chrboum
#1 Posted : Wednesday, July 16, 2014 5:37:25 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/6/2014(UTC)
Posts: 5
Location: United States of America

I am running NCrunch v2.8.0.1. I have seen this issue posted in the forum before, but I don't appear to have the original author's problem. I reviewed the NCrunch Report.zip logs, and nothing sticks out to me. Any advise on where to look next, or how to debug this issue further?

System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
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 System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
at nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents, GridClientId gridClientId, CustomEnvironmentVariable[] customEnvironmentVariables)
at nCrunch.Core.Processing.BuildTaskLogic.DoProcessTaskAndReturnSuccessFlag()
at nCrunch.Core.Processing.TaskLogic.ProcessTaskAndReturnSuccessFlag()
at nCrunch.Client.Processing.LocalProcessingTask.ProcessTaskAndReturnSuccessFlag()
at nCrunch.Client.Processing.ProcessingQueue.#=qb0akXOvmmpLAjKKWBO4dKQ==(LocalProcessingTask #=q45$lN3wFtvBlp$4hmkwdDg==)
Remco
#2 Posted : Wednesday, July 16, 2014 8:53:57 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for sharing this issue.

It looks like NCrunch is being bugged out by either:
1. A source file that has been referenced inside the project twice
2. A project that is being referenced by this project twice

Note that this is a fairly internal problem, so it's quite possible that you don't have duplicate references inside your project and that NCrunch is simply resolving something twice as a result of your project or solution structure. Still, I recommend checking to see if there is any obvious duplication.

Do you also experience this problem for the project when it fails to build? (i.e. if you intentionally break it?)

It would be great if you could share with me a log file leading up to the problem. You're welcome to submit this either via the bug reporter or as an upload through the contact form.

Cheers,

Remco
chrboum
#3 Posted : Thursday, July 17, 2014 3:58:07 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/6/2014(UTC)
Posts: 5
Location: United States of America

I just sent a bug report, and referenced this post.

I didn't see 1 or 2, but it was enough to get me unblocked. The project was referencing another project unnecessarily, so I deleted the reference. Once I did, it worked. I sent the logs before I got it to work, so I sent another bug report for completeness in case the logs would help.


Thanks,
Christopher
Remco
#4 Posted : Thursday, July 17, 2014 4:25:32 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Excellent! Thanks Christopher. Hopefully with the bug reports I should be able to identify this problem and fix it in a future build.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.031 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download