How to clear Visual Studio Team Explorer Cache

Switching between Team Project Collections sometimes messes up documents and reports and gives a red X next to both these artefacts in Team Explorer. I have run into this several times in the last couple of months and clearing the Visual Studio Team Explorer Cache seems to resolve the issue.

TFS_Red Cross next to documents and reports

If you are sure you are set up with all the right permissions then the first step troubleshooting step is tearing down the Visual Studio Team Explorer cache. Please try refresh the visual studio local cache using the steps below,

1. Close Visual Studio if it’s open

2. Delete the Team Foundation cache on the client (be careful, delete the content of the folder only, not the cache folder itself)

C:\Users\\Local Settings\Application Data\Microsoft\Team Foundation\2.0\Cache
C:\Users\\Local Settings\Application Data\Microsoft\Team Foundation\3.0\Cache

You can additionally delete the Team Web Access Cache folder (the location for this can be found in the TFS Web.config)

(on 64-bit machine) C:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web Access\Web

In the web.config you'll find something similar:

   

   

   
 

3. Start Visual Studio again

Please also refer to this blog post from Bryan Krieger (PM – Visual Studio TFS) with more tips on how to troubleshoot this, http://blogs.msdn.com/b/bkrieger/archive/2010/04/27/visual-studio-client-connection-issues-after-upgrading-to-tfs-2010.aspx 

Enjoy In love

This article is part of the GWB Archives. Original Author: Tarun Arora [Microsoft MVP]

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.