JustNod
JustNod

Reputation: 53

Cannot check out source with tf.exe

I have been using TFS from the same laptop for 5 years. The laptop is being replaced and I am setting up the new one.

On the old laptop I could access TFS via VS2010 to “manually” check sources in and out. However I found it quicker to do this with a batch file that called tf.exe to check the source in/out.

On the new laptop I can access TFS via VS2017 to “manually” check sources in and out. I modified the batch file to include the new path for tf.exe but when I execute it, I get an error “The item… cannot be found in your workspace, or you do not have permission to access it”. The file(s) I try and check out are definitely where they should be and, as far as I am aware, I have full access to the folder.

Can anyone offer suggestions as to how I might resolve this? Thanks in advance.

I have tried executing the batch file from the local workspace folder and have verified using "tf vc workspaces" that the local folder is where I think it is.

Might it be something to do with using accessing TFS from both laptops using same credentials I wonder?

Upvotes: 0

Views: 92

Answers (1)

JustNod
JustNod

Reputation: 53

I finally resolved this in VS2017 by unbinding the local workspace (File/Source Control/Advanced/Workspaces/Remove) then recreating it (File/Source Control/Advanced/Workspaces/Add) then the tf command started to work.

I also cleared the cache (removed all files and folders within it) contained in users\myname\appdata\local\Microsoft\Team Foundation\7.0\Cache (Windows 10) because that was suggested by some threads arising from other Google searches but I don't think it necessarily helped.

Upvotes: 1

Related Questions