An item with the same key has already been added.

A SQL Server Management Studio add-in to source control your database in Subversion or Team Foundation Server.

An item with the same key has already been added.

Postby hyperdata » Mon Apr 04, 2011 4:35 pm

Getting this messge below, when we try to connect to a database.
"An item with the same key has already been added."

How can we correct/fix/workaround this?
hyperdata
 
Posts: 1
Joined: Mon Apr 04, 2011 4:32 pm

Postby james.billings » Mon Apr 04, 2011 6:44 pm

A common cause for this is if you have more than one file referencing the same object. The extra details on the error may well indicate which object is the cause.
Did you manually amend any of the files in your source control repository? Such as making a copy of some of the files for backup purposes?

Another potential is if you have objects named the same apart from their case (upper/lower etc) and you're not using a case sensitive collation.

Hope that helps - contact us directly at support if you get stuck!
james.billings
 
Posts: 1120
Joined: Wed Jun 16, 2010 11:10 am
Location: Red Gate

Re: An item with the same key has already been added.

Postby jeanette.uri » Wed Oct 15, 2014 8:49 am

Hi,
I am also encountering the same issue:
An item with the same key has already been added.

Upon opening the SSMS, I see the error:
Could not load file or assembly 'RedGate.SharedSSMS.VersionSpecific.2014, Version=0.1.0.1137' or one of its dependencies. The system cannot find the file specified.

And then when I am trying to Commit Changes, the "An item with the same key has already been added." happens.

Can somebody help please?

Thanks!
jeanette.uri
 
Posts: 3
Joined: Wed Oct 15, 2014 8:45 am

Re: An item with the same key has already been added.

Postby james.billings » Wed Oct 15, 2014 8:59 am

I'm surprised you're seeing the error about duplicates- normally the first error (about the missing SharedSSMS file) would stop SQL Source Control loading.

I'd suggest running a "repair" of the SQL Source Control installation from the add/remove programs option in Windows to see if that fixes the first error. For the second error, try unlinking your database, restarting SSMS and then relinking. That may well fix it, but if not, please email our support team (support@red-gate.com) with details of the error (send in the error report with your email address when prompted as well) and they'll be able to help out.
james.billings
 
Posts: 1120
Joined: Wed Jun 16, 2010 11:10 am
Location: Red Gate


Return to SQL Source Control Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests