Given Key was not present...

Feb 22, 2008 at 5:48 AM
Sorry to bother, but is someone looking into the "Given Key not present in the dictionary" problem? I did a bit of debugging yesterday, and couldn't figure out what's going on there. Seems similar to the uppercase problem, though I can't imagine what could be wrong with the server names I'm using.
Feb 22, 2008 at 6:39 AM
Looking at the source code a bit more, I've finally found the problem. As is always the case when working with TFS servers, I entered the server names as http://server:8080. This is always the way I've seen it done, in all MS programs, etc. Then, I noticed the following line in TFSMigrationItem.cs:

TeamFoundationServer tfServer = AuthenticationHelper.GetServerInstance((new Uri(m_serverUrl)).Host);

Note that it gets the server instance based on the Host property, not the entire URL! So, I tried simply entering the server name, and voila, it works! To be honest, I see now that I overlooked that difference between my usage and the tutorial video, but perhaps it should be made a bit clearer in both the docs, and the program itself? Anyway, problem solved.
Feb 22, 2008 at 10:00 AM
I'm happy to hear that you got this working. I'll see if I can spell this out in greater detail in the next rev of the documentation.

Thanks for the feedback.


lonevvolf wrote:
Looking at the source code a bit more, I've finally found the problem. As is always the case when working with TFS servers, I entered the server names as http://server:8080. This is always the way I've seen it done, in all MS programs, etc. Then, I noticed the following line in TFSMigrationItem.cs:

TeamFoundationServer tfServer = AuthenticationHelper.GetServerInstance((new Uri(m_serverUrl)).Host);

Note that it gets the server instance based on the Host property, not the entire URL! So, I tried simply entering the server name, and voila, it works! To be honest, I see now that I overlooked that difference between my usage and the tutorial video, but perhaps it should be made a bit clearer in both the docs, and the program itself? Anyway, problem solved.

Feb 22, 2008 at 11:43 AM
To be honest, it would probably be trivial for the app to recognize this on its own, for example, if the server name had a colon in it. Would probably save alot of headaches. Thanks, though, in any case!