Today, I encountered an interesting problem with Team Foundation Server, TFS Explorer that prevented me from viewing any files in my workspace. It took me a while to determine the cause, and I’m hoping my finding will be helpful to others with this issue.
When I opened Visual studio, the TFS Explorer was indicating that no files had been gotten to my local workspace directory. Furthermore, all my check-outs were gone.
The first thing I did was review my workspace settings for the TFS Explorer. As it turns out, the TFS Explorer was authenticating me as the “Administrator” account rather than my “Kyle” user account, which I was logged into Windows with.
I first thought maybe Visual Studio was running as Administrator, but the Task Manager debunked this theory. You can see that below.
Ultimately, the problem was that Windows had somehow stored credentials for the TFS server, using the Administrator Account. Each time that the TFS Explorer connected to the server, it did so using those stored credentials.
To resolve this in my Windows Server 2008 environment, I navigated to Control Panel > User Accounts > Manage Your Credentials, and I removed the Windows Credentials for that server from the vault.
Once that was complete, I re-launched Visual Studio and double checked the TFS Explorer Workspace Editor. This time, it correctly displayed the user that I was logged into Windows with.