Go in to manage Workspaces and click edit. On the edit workspace window select the one you want to change. Then click remove.
Press Shift+F10 to display the workspace button's pop-up menu. Press the Down Arrow key to select the Rename item, then press Return. The button becomes a text field. Edit the workspace's name in the text field.
Solution 1. In the Advanced Edit Workspace Window, you will find option for Owner. You can update there. Try it out once and let me know if that works..
This command run in the Developer Command Prompt for Visual Studio did the trick:
tf workspaces /updateComputerName:MyOldComputerName /s:"http://MyServer:8080/tfs/MyCollection"
It had to be run from the computer I wanted to assign the workspace to (that is how it gets the new computer name.
Vaccano's solution worked for me. It took me several tries to get the TFS URL right, so I thought I'd post it for those of you who are using Microsoft's Visual Studio TFS hosting (currently free for small teams).
From a command prompt on my computer, I first changed to the right directory:
cd c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE
Then I ran the command:
tf workspaces /updateComputerName:OLDCOMPUTERNAME /s:"https://MYCOMPANY.visualstudio.com/DefaultCollection"
It then told me that my new workspace matched the machine name of my new computer name.
Hope the path helps.
Go to VS command prompt and type the following:
tf workspaces
This will provide you with the available Collections. Copy the path (essentially a URL) of your intended collection. Then type the following:
tf workspaces /updateComputerName:"OLD_NAME" /collection:"The URL copied from above"
(exclude the quotes above)
Vaccano was correct, however, I needed the workspace name after the UpdateCompterName switch. In my case the workspace was the old machine name.
If you don't know your workspace name you can find all workspace names using:tf workspaces /owner:* /computer:* /server:http://MyServer:8080/tfs/MyCollection
So I ended up with the following.tf workspaces /updateComputerName:MyOldComputerName MyOldComputerName /s:http://MyServer:8080/tfs/MyCollection
I tried running the commands mentioned in the other answers; however, my project is hosted in TFS online (visualstudio.com) so I needed to authenticate first since I kept getting this error message:
TF400813: Resource not available for anonymous access.
For me it was just easier and much faster to remove the worskpace and reconnect again:
File > Source Control > Advanced > Workspaces (remove workspace)
Given below how it worked for me.
Step 1. Go go Visual Studio Command Prompt
Step 2. In above command prompt type command tf workspaces
. This command will show all the workspaces you created in your machine and also the collection name. Look carefully for first line of the result of the command.
Step 3. In same command prompt type command tf workspaces /updateComputerName:OLDCOMPUTERNAME /s:"collection name as shown above"
The OLDCOMPUTERNAME AND COLLECTION NAME ARE VERY IMPORTANT HERE.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With