The given key was not present in the dictionary

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

Moderators: Chris Auckland, David Atkinson, sherr, PhilScrace, andy.campbell.smith

The given key was not present in the dictionary

Postby amumaugh » Thu Apr 26, 2012 3:20 pm

I saw another thread about this but it had to with an issue with static data which, as far as I can tell, is not defined in my instance. I have linked to an existing database and get the error when trying to get latest. Here is the full error:

System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at #GWeb.#XXM.#NHdb(DatabaseObjectId , IEnumerable`1 )
at #GWeb.#XXM.#Fvi.#iz2b(DatabaseObjectId )
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at RedGate.Shared.Utils.Collections.Set`1..ctor(IEnumerable`1 src, IEqualityComparer`1 comparer)
at RedGate.SQLSourceControl.Engine.Model.DatabaseObjectIdSet..ctor(IEnumerable`1 src, Boolean caseSensitive)
at #GWeb.#XXM.#Xt3(DatabaseObjectIdSet )
at #GWeb.#XXM.#tYM()
at #GWeb.#WXM.#qYM()
at #GWeb.#XXM.#iS()
at #qlhb.#0heb.#l36(String , #1heb , ICancellableOperationStatus )
at #qlhb.#K3c.#83c(String , #O9U , ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks )
at #qlhb.#0heb.#wieb(#L3c , #ZZ7 , #A57 , IDatabasePollingManager , IObjectExplorerStateService , #xHR , #9ynb , #4Ec , #j3l , Options , #quBb , ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks )
at #GWeb.#VXM.#mYM[#NrPb](Func`2 , ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks , IDifferenceSelector )
at #GWeb.#VXM.#kYM(ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks , IDifferenceSelector )
at #GWeb.#4Ec.#8Jc(ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks , IDifferenceSelector )
at #GWeb.#4Ec.#izb1.#SB7b(ICancellableOperationStatus )
at RedGate.SQLSourceControl.Engine.Cancellables.MutexedCancellableOperation`1.#u36.#k5f()
at RedGate.SQLSourceControl.Engine.Cancellables.CancellableOperationBase.InvokeWithTracker(String featureUsageKey, Action action)
at RedGate.SQLSourceControl.Engine.Cancellables.MutexedCancellableOperation`1.Invoke()
at #eEc.#Qlg.Invoke()
at #JLc.#PLc.#Jfb.#EJf()
at RedGate.SQLSourceControl.Engine.SmartAssembly.ExceptionReporting.ErrorReporterBase.Do(Action , Predicate`1 , Boolean )
at RedGate.SQLSourceControl.Engine.SmartAssembly.ExceptionReporting.ErrorReporterBase.DoWithObviousExceptionsRethrowAll(Action action)
at RedGate.SQLSourceControl.CommonUI.Forms.ErrorDialog.DoWithObviousExceptionsRethrowAll(Action action)
at #JLc.#PLc.#CTc(ICancellableOperation`1 , Object )
amumaugh
 
Posts: 13
Joined: Thu Jun 30, 2011 6:40 pm

Postby amumaugh » Thu Apr 26, 2012 7:35 pm

The issue did have to do with Static data. Fortunately for us, the static data feature was just initially evaluated and never really used so I was able to delete the files under the Data folder for this database on the SVN server. It would be interesting to hear what someone would have to do to retain those files and resolve the error in this kind of scenario.
amumaugh
 
Posts: 13
Joined: Thu Jun 30, 2011 6:40 pm

Postby andy.campbell.smith » Mon Apr 30, 2012 4:18 pm

Glad to hear you got the problem sorted out! We don't really have a standard procedure to prevent this, unfortunately - it just comes down to trying to find the specific offending object each time. Do let us know if you run into this again, though and we'll do our best to help out!
Andy Campbell Smith

Red Gate Technical Support Engineer
andy.campbell.smith
 
Posts: 173
Joined: Thu Oct 20, 2011 11:19 am
Location: Red Gate Software


Return to SQL Source Control 3

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest