Needed to delete a branch in one team project so ran this command: tf destroy $/MyProject/Main/Bin /collection:http://servername:8080/tfs/myproject
The command completed but now when I open visual studio I get multiple errors with same message, saying
An item with the same key has already been added
Most solutions on SO recommend emptying out the cache folder under AppData which I've already done - does not help in my case. Now I cannot open any team project in my collection. All because I deleted one branch in one team project from command line!
And this operation never completes, stuck at "Working..."
Please try below ways:
Make sure any instances of Visual Studio are not running, then delete all the caches files:
C:\Users\username\AppData\Local\Microsoft\Team Foundation[version]\Cache C:\Users[username]\AppData\Roaming\Microsoft\VisualStudio\14.0\Team Explore
Try to reset all environment settings:
Tools > Import and Export Settings > Reset all settings
Add a new workspace and map the sources to another location
Go to "File"-> "Source Control" -> "Advanced" -> "Workspaces..."
Try to run Visual Studio with another valid user by this command: (Navigate to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE)
runas /netonly /user: devenv.exe