How do you force the deletion of a TFS 2010 workspace on a client when the TFS Server no longer exists?

后端 未结 3 748
一生所求
一生所求 2021-02-09 17:12

I currently have a TFS 2010 Server running on SERVER-1. On my client (MY-CLIENT) I have VS2010 running and have a workspace associating SERVER-1 with \\MY-CLIENT\\Development.

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-09 17:34

    The working folder mappings for all the local workspaces is stored in the version control cache file. This allows you to bootstrap TFS clients, allowing them to locate the server information for a given local folder. In addition, it will provide the information for this test you're seeing, that prevents a local folder from being mapped to two different servers.

    In order to clean this up (without trying to connect to the server), you can use the tf workspaces command (note the pluralization - the workspaces command operates on the list of workspaces, the workspace command operates on a workspace and generally requires connectivity to the server that workspace is located on.

    To delete all workspaces for your deleted project collection, you can do:

    tf workspaces /remove:* /collection:http://server-2:8080/tfs/DefaultCollection
    

    (Obviously replacing the project collection URI with the URI for your deleted server.)

提交回复
热议问题