I have 2 accounts to my Azure Devops TFS repository. I only really use one of them. Yesterday I accidentally signed in with my other account and now it has taken over my workspace somehow. All my pending changes are gone and my source control bindings. I have backed up my source and can do a winmerge diff to find my changes but I cannot delete or change ownership of the workspace as it keeps coming back after deletion. I repaired my VS 2020 installation and that other account is signed out but every time I create a new workspace the owner is the other account. Please help.
Update: So I tried to repair the VS installation in hope that it would reset everything but it did not work. I uninstalled Visual Studio completely, also did not work. These workspaces will not disappear. Visual Studio hangs and crashes around 50% of the time now when I start it up. If I cannot resolve I know reinstalling my Windows will fix it but that's a bit dramatic. Hoping someone knows how to 'reset' further than an uninstall.
I will not accept this answer but I think its worth posting as it was my only sure way of resolving within a known timeframe. I am sure there is a better way but if someone finds themselves desperate, this is a way out.
I reinstalled Windows 11 with option to delete all my files. When I reinstalled Visual Studio 2022 I was shocked to see the workspace back again. Clearly it got this from the server so I used some tf CLI commands (thanks @DanielMann)
to delete these and this time round they never came back. I have used the tf commands prior but the workspace kept coming back.
Not an ideal solution but I keep my dev laptop quite light and everything can go. The reinstall took like 20 mins, plus another 30 to reinstall software compared to the whole day I lost yesterday.
Also worth mentioning I had previously used tf commands to get all the workspaces outputted in xml so I could specify the workspace and userid. Tried a bunch of other ways to delete the workspace also but nothing would work.
Reinstalling Windows AND removing workspaces from server ensured the workspace never reappeared.
Be also worth nothing that at this point I no longer cared about the workspace but whatever happened caused my Visual Studio 2022 to no longer function correctly even after a reinstall. It would hang and crash all the time and this now fixes it (as you'd expect with a reinstall of OS).