My System Administrator renamed my computer. So where it was "MyLaptop2" it is now just "MyLaptop".
So now all my source control bindings and checked out files are looking for a workspace with "MyLaptop2".
Is there a way to redirect that workspace to my renamed (but still the same) computer?
To avoid get and map after creating new workspace
Run
cmd
Navigate to visual studio IDE path. Something like this:
Run this command:
In "manage workspace", delete the added workspace (named as your current computer name), and rename the old one to your current computer name.
In this scenario you don't need any extra get and map.
Just to clarify for users of TFS Online (MS hosted TFS) - if your url was "mytfs.visualstudio.com" and your collection is "DefaultCollection", the commands as listed above will be:
To list all workspaces: tf workspaces /owner:* /computer:* /server:https://mytfs.visualstudio.com/DefaultCollection
To update from OldPcName: tf workspaces /updateComputerName:OldPcName /server:https://mytfs.visualstudio.com/DefaultCollection
In short, specify HTTPS, ignore the port and don't add a /tfs/ folder structure.
You can then select (and rename if desired) the workspace by going to source control explorer and using the Workspace drop down.
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 someone don't feel so comfortable with
CommandPromt
(like me) This Infographic post can help you . here is the text snippet from the blog:Click on FILE menu on your Visual Studio 2013. Now click on
Source Control -> Advanced -> Workspaces..
This will open a window with title "Manage Workspaces". It shows the list of workspaces on this computer to which you have access. The list contains 4 columns for:
Add Workspace: If Workspace Manager is empty, probably you didn't added one yet. Click on Add button and put your server/ username/ password and it will list the added one for you.
Update Workspace: Later if you have changed your computer name or anyway you want to update your workspace accordingly, select the workspace you want to edit and click on Edit button; here you can update your workspace details.
I had the same problem and came here. But then I just closed and reopened visual studio and it was fine. So... that might be the solution for some.