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

Notification

Icon
Error

An item with the same key has already been added
sherga
#1 Posted : Wednesday, April 2, 2014 4:14:17 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/2/2014(UTC)
Posts: 5
Location: United Kingdom

Hi,

I'm evaluating NCrunch for a number of F# projects I am working on. I've let NCrunch work over a small solution and it builds a number of the dlls successfully but for a small number they fail to build with the following exception

[17:04:14.1933-LocalBuildTask-34] ERROR (Internal): 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 nCrunch.Core.BuildManagement.ReferencedAssemblySet.AdjustAssemblyReferencesUsingReferencesOutputFromBuild(FilePath[] assembliesUsedByBuild)
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.#=q_vyIzYQsi20eEpIpxNwCkQ==(LocalProcessingTask #=ql59clHcEc0_22CWMfMeExQ==)

It's not immediately obvious to me what might be wrong - the same projects all build fine in Visual Studio (I'm using VS2010) and via MSBuild.

Any idea how I can get more information / debug output on the underlying problem so I can try and work out how I need to tweak my project?

Thanks!

Adam
Remco
#2 Posted : Wednesday, April 2, 2014 8:51:20 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi Adam,

Thanks for reporting this issue. It looks like the NCrunch build is reporting some kind of reference duplication in its output. Probably this is related to a library or toolset used by some of your projects.

Would you be able to submit a bug report straight after NCrunch has tried to build one of these failing projects? Hopefully the log file in the report will give us some more information.


Cheers,

Remco
sherga
#3 Posted : Thursday, April 3, 2014 7:46:01 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/2/2014(UTC)
Posts: 5
Location: United Kingdom

Hi Remco,

Thanks for the quick reply - I've just restarted VS, let NCrunch start processing my solution and then as soon as the first project has errored in this way I've submitted a bug report via the NCrunch menu. Hopefully this will provide some more information about what is wrong.

Cheers

Adam
Remco
#4 Posted : Thursday, April 3, 2014 9:10:38 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Thanks Adam. Unfortunately the log didn't show which reference was the direct cause of the problem, but I think this is an issue best solved by making NCrunch more resilient to this kind of build behaviour.

I'd like to provide you with a fixed build. If all goes well, hopefully I can get this to you tomorrow.
sherga
#5 Posted : Thursday, April 3, 2014 11:08:10 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/2/2014(UTC)
Posts: 5
Location: United Kingdom

Sounds good - very happy to try out an experimental build when you have one.

Cheers
Remco
#6 Posted : Friday, April 4, 2014 3:01:56 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
sherga
#7 Posted : Friday, April 4, 2014 7:38:04 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/2/2014(UTC)
Posts: 5
Location: United Kingdom

Hi Remco,

Unfortunately I can't access any of the links - I get 'Access Denied' (I've tried from a few environments / platform / work & home and it's the same result). I've logged in/out of the NCrunch site but it made no difference.

Cheers

Adam
Remco
#8 Posted : Friday, April 4, 2014 7:45:20 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Sorry, this was my mistake. I forgot to make the links public. Try again now.
sherga
#9 Posted : Friday, April 4, 2014 8:39:39 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/2/2014(UTC)
Posts: 5
Location: United Kingdom

Hi - I've downloaded and installed and my solution is now successfully 'crunched' with no errors (or changes needed on my side) - initial thoughts are very positive. Thank you!
Remco
#10 Posted : Friday, April 4, 2014 8:58:21 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Excellent! I'm glad this did the trick. Thanks for the feedback :)
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.062 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download