TFS 2010 – item locked…

First of all, just a little disclaimer – I’m NOT a TFS specialist (neither a developer); I’m only a user that wants to help you save the time troubleshooting some errors that I encountered along the way (I’m also not responsible if the following deletes your data, crashes your computer or worse). 🙂

Today I had some troubles with my TFS 2010 installation. For some reason, it was giving me error saying “The item [full_path] is locked for check-out by [user_name] in workspace [workspace_name].“. Error looks something like this:

tfs_error_1

Ok, so my file is locked by some other user – first approach would be to ask that other user to “unlock” it for me. In my case, this method was not successful. This other user said to me that he’s also having the same problem just with another user’s locked file…

If you have the same problem, and want to resolve this as quickly as possible (Is this the best method? Probably not; I don’t know, but this helped me (see the disclaimer on top of the post)), maybe this workaround will help you as well:

W: If you know your way around command prompt, you can use the tf.exe utility (http://msdn.microsoft.com/en-us/library/z51z7zy0(v=VS.100).aspx) that is available if you installed Visual Studio. As the documentation says, you can find this utility in the following location “<drive>:Program FilesMicrosoft Visual Studio 10.0Common7IDE”. The full command that I used is: tf workspace /delete [user_workspace];[domain][user_name] /s:http://[tfs_server_name]:8080 (i.e. tf workspace /delete TOMICA-PC;HOMEtomica /s:http://localhost:8080/tfs).

I hope that someone finds this information useful, and I’m looking forward to get some comments from people that are more experienced in this matter…

Leave a Comment.