Paul Michaels
Paul Michaels

Reputation: 16695

TFS Workspace Cache

I appear to have some problems with my workspace cache. When I type:

tf workfold

In my workspace directory, I get the error:

Unable to determine the workspace

This article seems to imply that it’s a problem with the cache. Being cautious, I tried removing a single workspace:

tf workspaces /remove:WORKSPACENAME /server:servername

This seemed to work (that is, the command succeeds), because if I do it a second time it fails. However, when I issue:

tf workspaces

It still lists this workspace, and I still get the error.

Can anyone give me any guidance of the next step here? I assume what I’m deleting it the cache for the workspace and not the workspace itself, do I need to clear all my workspaces for this to work? If so, why might this make any difference?

Upvotes: 2

Views: 8347

Answers (3)

Saket Kumar
Saket Kumar

Reputation: 1

You can try this one to delete the workspace:

tf workspace login:[your login credentials] - delete workspacename -collection:[collection URL]

example:

tf workspace login:US\\saket.kumar - delete saketworkspace1 -collection:https://tfs1101.client.com/tfs/CTS

Upvotes: 0

James Reed
James Reed

Reputation: 14052

this might be a daft question but are you running the tf workspaces command from a folder that's mapped to the workspace? e.g. your workspace mapping is something like $/MyTeamProject/Source -> c:\source

when you open your command prompt you should cd c:\source before running tf workspaces

Upvotes: 0

Jehan33
Jehan33

Reputation: 3780

Try running below command to refresh the cache:

tf workspaces /s:http://tfs-server:8080

Upvotes: 2

Related Questions