Change TFS source control mapping in Visual Studio

2019-04-06 21:27发布

I have multiple solutions that were previously mapped to a hosted TFS. Their local mapping was defined as well and all the source code was up-to-date locally. I have since discontinued my TFS subscription and started using visualstudio.com as my TFS server.

I went into one of the solutions, deleted the *.vssscc files from the solution and the *.vspscc files from each nested project. When I open the solution in VS 2013, the output window gives me a message saying the the original TFS (unsubscribed now) is not available and that the solution is open offline.

As a result, when I choose the "Change source Control" option, it first asks me to log in to the old TFS whose credentials are no longer valid.

Furthermore, it tells me that the local directory I am trying to map to the new TFS is already mapped to the old TFS. How can I remove this mapping without having access to the old TFS?

3条回答
Lonely孤独者°
2楼-- · 2019-04-06 21:37

Not sure if this works if you're offline, but you can remove the mapping by opening the Manage Workspaces area in Source Control Explorer (click on the ... option of the dropdown to the right of Workspace:)

Manage Workspaces -> Select your workspace -> Edit -> Remove or change your mapping.

查看更多
Evening l夕情丶
3楼-- · 2019-04-06 21:40

It's probably easiest to remove the mappings using the commandline

tf workspaces /remove workspacename;owner /collection:http://urlto.old:8080/tfs/ProjectCollection

After removing the old workspace configuration for the current folder and mapping the folder to your new subscription, Visual Studio should prompt you to automatically update the solution bindings to the new server.

This will not delete your workspace from the server (which keeps track of the workspaces), but since you no longer have access to it, it should be enough to let your client forget the folder is mapped.

查看更多
The star\"
4楼-- · 2019-04-06 21:45

The answers here work when the old TFS server is available. Mine wasn't but has not been removed from the server list in VS. Removing that entry allowed me to remove the solution from source control entirely along with the mapping and add it to another source control server.

查看更多
登录 后发表回答