Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the local path of a subfolder in TFS (not the whole workspace)?

Tags:

When I started working on a project I downloaded IPAddress\CompanyName\ProductName\DevBranch in TFS, mapping it to C:\DevBranch. But now I want to map the root folder to a local path, so I've mapped IPAddress\CompanyName to C:\CompanyName. However, IPAddress\CompanyName\ProductName\DevBranch is still mapped to C:\DevBranch and not C:\CompanyName\ProductName\DevBranch.

How do I change the mapping of this local path? I want to have it automatically move all the files from the old local folder to the new local folder.

Everything I've looked up keeps talking about editing workspaces, and only seems to apply to changing the root folder. When I go to edit my workspace, the only local mapping that shows up is C:\CompanyName. There's nothing that allows me to change mappings on a subfolder-by-subfolder basis.

EDIT: I've now tried editing the workspace by adding a new working folder, setting the source control folder to IPAddress\CompanyName\ProductName\DevBranch and the local folder to C:\DevBranch, then changing the local folder to C:\CompanyName\ProductName\DevBranch, and it still didn't work. Source Control explorer is still showing C:\DevBranch as the local folder. Please help. I don't know what to do.

EDIT: I was able to right-click IPAddress\CompanyName in Source Control Explorer and click Advanced > Remove Mapping. However, no such option existed when I right-clicked IPAddress\CompanyName\ProductName\DevBranch. It's like some kind of zombie mapping. I can't change it, I can't remove it, and Source Control Explorer keeps showing it without acknowledging the mapping exists in most cases.

like image 394
Kyle Delaney Avatar asked Oct 02 '17 19:10

Kyle Delaney


People also ask

How do I change the local path in Visual Studio?

In Visual Studio, click Tools > Options. Expand Projects and Solutions and click Locations. The Projects location field defines the default location for storing new projects. You can change this path if you are using a different working folder.


1 Answers

If you want to change the local path for the working directory of the Team Foundation Server (TFS), you need to go to File -> Source Control -> Workspaces (File -> Source Control -> Advanced -> Workspaces for VS2017), then select your workspace (it should match your computer name) and click Edit.

In the next dialog change the mapping for the root TFS node to the new location on your hard drive. You need to perform a "Get" on the whole TFS tree to update project associations.

like image 113
Muhammad Yaseen Avatar answered Oct 22 '22 17:10

Muhammad Yaseen