I have 2 different ID's (one is my TFS admin account, say id1, another is my regular user ID, say id2). For some reasons, I got the following:
(1) Under id2, all the workspaces show up in vs.net are those in id1. Why
(2) Under id2, when I try to add a new workspace, the "add workspace" panel defaults the owner to id1, but the account I currently log in is id2. What happens
(3) I override the owner with id2 in the "add workspace" panel and go ahead finish the panel. After I click "ok", the new workspace does not show up in the selection list.
(4) When I try to create another workspace with the same mapping. Vs.net disallows me because there is another workspace having the same mapping. So the one I create before is actually existing in TFS.
(5) I appreciate any answer to resolve this mess.

Two different ID's seems to see the same set of workspaces
FriendsReunited.com - Alex
The version control cache file will keep a list of the workspaces you've created and the id that owns them. So, if you create a workspace with "tf workspace /new /login:id3,password" you would see a workspace added to your cache file and owned by id3. That's by design so that if you run a command like "tf edit foo.cs /login:id3,password" it all works as expected (i.e., tf can find the workspace definition in the cache file).
When you run "tf workspaces /s:server" you will only update the workspaces in the cache that are owned by your current user id. If you wanted to update the cache with the workspaces owned by id3 on the current computer, you'd use "tf workspsaces /s:server /login:id3,password" instead.
If you wish to clear your cache file, you can run "tf workspaces /remove:* /s:*" and then run "tf workspaces /s:server" to repopulate it.
The workspace name must be unique for a single user on a repository. The computer name is not part of the key that makes the workspace unique (just name and owner).
Buck
Niki7
Thanks for responding. Answers to your questions:
1. I log on with my TFS admin ID on the TFS server machine via Remote Desktop Protocol. I log on with my regular ID on my own desktop PC. I never use both ID's on the same machine.
2. The VersionControl.config file (login with my admin ID) shows only 1 workspace:
workspace=d1 owner=id1 computer=server1
However, The VersionControl.config file (login with my regular ID) shows 4 workspaces:
workspace=d1 owner=id1 computer=desktop1
workspace=w2 owner=id2 computer=desktop1
workspace=w3 owner=id2 computer=desktop1
workspace=w4 owner=id2 computer=desktop1
Now it seems that I'm wrong about 2 different ID are seeing the same set of workspaces(I'm confused by that the workspace names are the same) . It seems that workspaces are keyed or indexed not only to ID but also to computer. My admin ID (id1) while on the TFS server has only 1 workspace which is ok.
My regular ID while on my desktop has 4 workspaces. One is owned by id1 because that was the ID the "add workspace" defaulted to(which really should not happen). So here are two new questions:
(a) Why does vs.net allow me to create a workspace with another ID as owner and do not allow the other ID to see it in vs.net
(b) Why vs.net does not show me the other 3 workspaces (owned by id2) which are clearly in the VersionControl.config file
3. The tf workspaces /s:<your tf server here> /format:detailed give me only workspace:
workspace=w1 owner=id1 computer=desktop1
So this does not agree with what is in VersionControl.config file.
I appreciate that you help me to make sense out of these. Thanks.
CrazyIdeas
Probably the cache has been casuing some of the confusion that troubles me. You said the workstation is not one of the keys but I think it is. Because I can only see those workspaces in vs.net that belongs to the PC that I'm currently on. My other workspaces which are created on a different PC are not available, athough the tf.exe shows their existence.
I kind of figure out what is causing my confusion. For some strange reason, vs.net remembers me as id1 even I log in Windows as id2. I somehow purge the registry making vs.net think that I've never used it before. It goes thru "configuration for the first time". From there on, it tells TFS I'm id2 and everything seems ok.
Thomas Schneider
Nim,
Sorry you are having trouble with workspaces. From the description, I am not sure what is going on. However, I do have a few questions and suggestions that may help find out.
1. Are you completely logging off and logging on as the different account or doing a run as
2. Workspace data is cached on the client machine in the following location:
C:\Documents and Settings\<your login name>\Local Settings\Application Data\Microsoft\Team Foundation\1.0\Cache\VersionControl.config
Look at those files for each respective login. How do they compare
3. Close all instance of Visual Studio. From a Visual Studio command prompt (Start, All Programs, Visual Studio 2005, Visual Studio Tools, Visual Studio command prompt) run the following command:
tf workspaces /s:<your tf server here> /format:detailed
This command will refresh the local cache with the server data (i.e. update the VersionControl.config file you looked at above)
Do you see what you would expect If not, what is unexpected
After running this command, start Visual Studio and see if the issue is fixed or not.
Keep us posted on your results.
Ed
http://blog.msdn.com/edhintz
McROBBHOOD
YetAnotherLogin