I renamed my computer name, and now my TFS workspace is broken in Visual Studio 2012.
When I type:
tf workspaces /computer:ABOTONJIC-PC /owner:* /format:
To get this to work in Visual Studio 2017 use the following (new location)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe workspaces /collection:https://youraccountnamehere.visualstudio.com /updateComputerName:OLD-COMPUTERNAME
Hope this saves someone some time!
Open the visual studio command prompt and type the following command
tf workspaces /updateComputerName:oldcomputername /s:http://tfservername:port#/tfs
for example
tf workspaces /updateComputerName:abc-PC /s:http://mytfsserver:8080/tfs
You can run the following command before and after running the above command, this is just to check the workspaces information on your computer.
Remember: run all these commands on client computer (which is renamed) and not on the computer where TFS server is installed.
If user name is also changed then run the following command
tf workspaces /updateUserName:oldUserName /s:http://mytfsserver:8080/tfs
Hope it will help.
You can add new workspace then use vs 2017 delete your previous workspace:
Open Command prompt and type as shown in below
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
and type the following code with your credential
tf workspaces /updateComputerName:OldComputerName /s:"https://tfsServerName"
In CMD prompt
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE>tf workspaces /updateComputerName:OldComputerName/s:"https://tfsServerName"