To prevent workspace errors from occurring, the data cache on client computers must be updated after certain maintenance operations. After you move, restore, rename, or fail over a data-tier or application-tier server or after you recover from a failure such as a hardware malfunction, you must refresh the version control cache on client computers.
To refresh the version control cache, each user runs the tf workspaces command on any computer that must be updated. They must update any computer that uses version control and that connects to a team project collection whose databases were relocated.
To refresh the version control cache on client computers, you can perform the following steps on the client computer:
1. Open a Command Prompt window with administrative permissions, and change directories to Drive:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE. I’m assuming that you are using Visual Studio 2013.
2. At the command prompt, enter the following command, including the URL of the collection, which includes the server name and the port number of the new server:
tf workspaces /collection:http://ServerName:Port/CollectionName
In the example deployment, a developer needs to refresh the version control cache for a project that is a member of the DefaultCollection collection, which is hosted in the VSALM deployment of Team Foundation Server. He types the following string:
tf workspaces /collection:http://VSALM:8080/tfs/DefaultCollection
NOTE: To use the tf workspaces command on the client computer, your Read permission must be set to Allow.