Warm tip: This article is reproduced from stackoverflow.com, please click
tfs visual-studio visual-studio-2013

TFS VS2013: How can I change local access path or even leave it again as unassigned?

发布于 2020-04-22 10:07:14

I am using TFS from VS2013. I have created a workarea and then I assign a local path in my computer to start getting last versions of some branches. I sometimes want to change local path of a branch (already mapped to a local folder) to point to another different local path from the same workarea or even to another local path of another different workarea. So I go into local path and I remove the content but Visual Studio already is pointing to that path and in the source control explorer path appears marked as white color instead of indicating it as not assinged and not allowed me to change it. How can I do this?

Also there is another case in which I am interesting in: If I has a branch already assigned to a local path within a workarea and I want to remove this and keep it again as unassigned how can I do it?

Questioner
Ralph
Viewed
35
PatrickLu-MSFT 2020-02-07 18:23

According to your description, seems you are using TFVC as your source control in TFS.

There is a mapping relationship for your local folder and source control folder in server. In general, you should map your entire project to a single local folder under c:\Users\YourName\Source\Workspaces. For example:

enter image description here

Some tips on effective folder names:

  • Keep all folder, sub-folder, and file names short to simplify your work and avoid potential long-path issues that can occur with some types of code projects.
  • Avoid whitespace if you want make command-line operations a little easier to perform. If your team has a large and complex codebase or if you want your workspace to contain only the files you need to improve performance, you can optimize your workspace.

You could they change your local path according to your requirements here. After you changed, you may need to do a get latest to sync up all changes. If you do not need files download in original local path, simply delete them.

Also there is another case in which I am interesting in: If I has a branch already assigned to a local path within a workarea and I want to remove this and keep it again as unassigned how can I do it?

You just need to remove workspace mapping, you could do this from three ways.

  1. From VS
  2. From VS on a different machine
  3. From the command line

More detail please refer Bogdan Gavril MSFT's reply in this question: How to remove a TFS Workspace Mapping?