The path <path> is already mapped in workspace <workspace>

I recently ran into a problem with a local TFS server. Although I was logged in as my local account, TFS insisted that I was logged in as Administrator. Since the server thought I was a different user, it prevented me from opening my local workspace with this error:

The path is already mapped in workspace

The path conflict error reminds us of one important fact about workspaces: only one local path can be mapped, per user, per team foundation server. Two users can't share the same filesystem path. And two different team foundation servers can't share the same filesystem path, either.

The system caches your workspace mappings in this location, so if you're having workspace-related problems, it's worth clearing this cache file out:

C:\Documents and Settings\[user]\Local Settings\Application Data\Microsoft\Team Foundation\1.0\Cache\VersionControl.config

As Buck Hodges points out, you can also clear the local cache file at the command-line:

tf workspaces /remove:*

But clearing the cache didn't help in my case. No matter how much I cleared, how many times I rebooted or logged off, I kept showing up as "Administrator", which means I was conflicting with myself! I could map to a new folder, but that's not what I want. How is this possible?

Well, it's possible if you physically log in to the Team Foundation Server using a different set of credentials. Those credentials are cached deep in the bowels of Windows, and retrieved automatically the next time you contact the server. That's our problem!

To clear the credential cache, try Start, Run, then type

control userpasswords2

And press enter. On the resulting dialog, click the advanced tab, and click Manage Passwords. Remove all cached credentials from this list.

Once I cleared the cached credentials, I was able to access the Team Foundation Server as myself again. Problem solved.

With this in mind, if you must log in to the Team Foundation Server, try to do so under your own credentials. It'll cause less problems later.

posted on Monday, February 05, 2007 4:03 PM by jatwood

Comments

# VSTS Links - 02/09/2007

Anthony Borton on Outlook 2003 TFS Addin.

Rob Caron on Updated: Team Foundation Installation Guide....
Friday, February 09, 2007 6:53 AM by Team System News