Share via

Rebuilding the Client Cache

You can force a rebuild of the cache on each client computer the next time it connects to a team project collection by using the witadmin rebuildcache command.

To prevent workspace errors from occurring during version control or build operations in Team Foundation, 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, you must refresh the cache for tracking work items and users must refresh the version control cache on client computers.


To avoid server performance issues, you should not run this command during normal operating hours.

The witadmin command-line utility is located in Drive:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE on the client computer that runs Team Explorer.

Required Permissions

To use the witadmin rebuildcache command, you must be a member of the Team Foundation Administrators security group or the Project Administrators security group for the project collection that you want to manage. For more information, see Team Foundation Server Permissions and Team Foundation Server Default Groups, Permissions, and Roles.


Even if you log on with administrative permissions, you must open an elevated Command Prompt window to perform this function on a server that is running Windows Server 2008. To open an elevated Command Prompt window, click Start, right-click Command Prompt, and click Run as Administrator. For more information, see the Microsoft Web site.

witadmin rebuildcache /collection:CollectionURL [/noprompt]





Specifies the URI of the team project collection. The format for the URI is the following: http://ServerName:Port/VirtualDirectoryName/CollectionName

If a virtual directory is not used, then the format for the URI is the following:



Disables the prompt for confirmation.

/? or help

Displays help about the command in the Command Prompt window.


The witadmin rebuildcache command invalidates cached data on all clients for a specified team project collection. This causes the cache for each client to be refreshed the next time the client connects to the project collection.


The following command invalidates the metadata cache for all clients that connect to Collection1 that is defined on the server that is named AdventureWorksServer. The client caches are updated the next time they connect to the project collection.

witadmin rebuildcache /collection:http://AdventureWorksServer:8080/AWTeam/Collection1

See Also


Refresh Your Team Foundation Client


Working with Team Foundation Clients

Other Resources

witAdmin: Administering Objects for Tracking Work Items