Reputation: 4232
Had to rename my PC and it has caused hiccups to TFS. All solutions in my workspace seem to be disassociated from source control.
File > Source Control > Advanced > Change Source Control
Running this command referred in this SO thread did not make any obvious difference:
tf workspaces /updateComputerName:oldPCName /s:"https://tfs-host-url/tfs/OurSolutions"
I'm thinking maybe deleting the old workspace entry from VS Manage Workspaces dialog might make a difference in running the above command? When I try to remove the old workspace (after clicking Show Remote Workspaces), I get this message:
Are you sure you want to delete the selected workspaces? All pending changes in the selected workspaces will be lost. This operation is permanent.
Question: What exactly does this message mean? I won't lose the pending changes that are sitting on my disk (old workspace) correct? And I can check them in once new workspace is created? So what exactly will be lost?
Visual Studio 2017: Version 15.7.6
TFS: Version 16.131.27701.1
Upvotes: 1
Views: 329
Reputation: 51183
Deleting a Workspace
If you delete a workspace that contains pending changes, Team Foundation cancels the pending changes as part of the delete process. Deleting a workspace does not delete the files and folders on the client computer that were in that workspace.
Workspace Modified. One or more working folders in version control have changed. Do you want to get the latest files from version control to update your workspace
This is an expected behavior, since your work folders changed, there are no mappings between the server and local. A better way is getting files and establishing mappings from server side first.
Then copy your back-up files/folders from old workspace folder to the new one. Windows system will judge to replace files and add new files. After this, TFS system will auto detect the changes in local and will list them as new pending changes. Some new add files maybe stay in the Excluded list, manually promote them in Included list.
Finally check in pending changes, everything should get back to normal.
Upvotes: 0
Reputation: 179
Your pending changes will still be there in the old workspace. Once you create the new workspace in a different location copy your old files over into it, and you will be able to check in those pending changes. Iw will likely want to check in everyfile, but that is ok.
Upvotes: 1