0

I got a new laptop from a company with company image.

I created a new folder and check-in it – it is working

I check in few files , -- it is working

I cannot check-in DLL , SQL or JPG files , getting Error TF10151: Cannot lock item

It is happening to all the developers who got the new laptop .

Everything is working from an old laptop for the same developer.

Error : TF10151: Cannot lock item $/ABC/DEF/Some.dll for check-out. The item $/ABC/DEF is checked out by UserName in the workspace LapTop Name.

And this error makes no sense at all. The folder is just created, How a developer check out the file which don’t even exist.

If user Profile copied from old laptop to New Laptop , it is working.

Any Suggestion ?

Thanks

Lucky Star
  • 53
  • 8
  • Not get your latest information, is the workaround helpful for you? Or if you have any concern, feel free to share it here. – Hugh Lin Aug 14 '20 at 07:22

1 Answers1

1

You can try to use unLock command to remove other users lock for an item.

tf lock /lock:none[/workspace:workspacename] [/recursive] [/login:username,[password]] [/collection:TeamProjectCollectionUrl]

To use the lock command, you must have the Lock permission set to Allow. Having the Unlock other user's changes permission set to Allow is required to remove a lock held by another user if you do not have Write permission for that user's workspace.

Or try to undo another user's checkout with the Undo command:

tf undo [/workspace:workspacename[;workspaceowner]][/recursive] itemspec [/noprompt] [/login:username,[password]][/collection:TeamProjectCollectionUrl]

You can also refer to this ticket for more solutions.

Hugh Lin
  • 17,829
  • 2
  • 21
  • 25
  • This has worked for me in the past. Just be sure you `dir /s` to find `tf.exe`. It'll be in a path such as `C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer` – spikey_richie Aug 12 '20 at 10:08