I blog about development using .net, C#, SQL, Windows RT, and other Microsoft technologies.
Disclaimer: All posts are provided "AS IS" with no warranties, confering no rights, and expressing only my personal opinion, not Microsoft's.
If your TFS client cache is corrupted, you might see this error:
---------------------------Microsoft Visual Studio---------------------------Error
An item with the same key has already been added.---------------------------OK ---------------------------
Here's a solution, run the following to clean the cache:
SET AppDataTF=%USERPROFILE%\Local Settings\Application Data\Microsoft\Team FoundationSET AppDataVS=%APPDATA%\Microsoft\VisualStudioIF EXIST "%AppDataTF%\1.0\Cache" rd /s /q "%AppDataTF%\1.0\Cache" > NULIF EXIST "%AppDataTF%\2.0\Cache" rd /s /q "%AppDataTF%\2.0\Cache" > NULIF EXIST "%AppDataVS%\8.0\Team Explorer" rd /s /q "%AppDataVS%\8.0\Team Explorer" > NULIF EXIST "%AppDataVS%\9.0\Team Explorer" rd /s /q "%AppDataVS%\9.0\Team Explorer" > NUL