Skip to content

An item with the same key has already been added #2340

Closed as not planned
Closed as not planned
@MrHinsh

Description

@MrHinsh

Got this error while migrating WI's. Can anyone help resolve this issue?

System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey](IEnumerable1 source, Func2 keySelector) at MigrationTools.Endpoints.TfsWorkItemConvertor.GetRevisionItems(RevisionCollection tfsRevisions) in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.ObjectModel\Endpoints\TfsWorkItemConvertor.cs:line 73 at MigrationTools.Endpoints.TfsWorkItemConvertor.MapWorkItemtoWorkItemData(WorkItemData context_wid, WorkItem context_wi, Dictionary2 fieldsOfRevision) in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.ObjectModel\Endpoints\TfsWorkItemConvertor.cs:line 39
at MigrationTools.TfsExtensions.RefreshWorkItem(WorkItemData context, Dictionary2 fieldsOfRevision) in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.ObjectModel\TfsExtensions.cs:line 51 at MigrationTools.TfsExtensions.SaveToAzureDevOps(WorkItemData context) in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.ObjectModel\TfsExtensions.cs:line 87 at VstsSyncMigrator.Engine.WorkItemMigrationContext.ReplayRevisions(List1 revisionsToMigrate, WorkItemData sourceWorkItem, WorkItemData targetWorkItem) in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 871

Originally posted by @akurisummoottil in #2336



Funding for us doing work on this tool is generally through 1) customer funding, or 2) donated free time.

Sponcer a Feature | Hire us directly

Metadata

Metadata

Assignees

Type

No type

Projects

  • Status

    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions