I'm using tf.exe to perform TFS source control tasks - mapping folders, getting files. The current folder is mapped in a workspace, I've checked. The mapping is created programmatically, then tf is invoked.
Whenever I run the code on a new machine, I'm getting the following message:
Unable to determine the workspace. You may be able to correct this by running 'tf workspaces /collection:TeamProjectCollectionUrl'.
If I perform that command, it clears things up and everything works from now on. However, what exactly does it do, and how can I do the same using TFS API?
The docs say it "updates cached information about a user name or computer name change on the server that is running Visual Studio Team Foundation Server." I don't get it - where's the cache? What do they consider a computer name change?
Calling Workspace.Refresh() or Workspace.Update() doesn't help.