5

Some TFS server files are checked out by one developer in eg (houbm10) machine in lock mode. After that the machine is changed with some other machine like houbm20, now I am unable to checkout those locked file.

So, how can I unlock those files?

Piyush
  • 5,145
  • 16
  • 49
  • 71
  • 1
    duplicate of http://stackoverflow.com/questions/3451637/how-to-unlock-a-file-from-someone-else-in-team-foundation-server – Arnon Rotem-Gal-Oz Dec 21 '11 at 07:30
  • 1
    hi! Rotem, but i m still getting problem `The item C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\References\AxInterop.OfficeCtrl.dll could not be found in your workspace, or you do not have permission to access it. The item $/S/B/P_AOT_2.1/dotNET/Symphony/Tools/UpdateUserResources/Dll could not be found in your workspace, or you do not have permission to access it.` – Piyush Dec 21 '11 at 09:22

3 Answers3

14

To unlock individual files run the command below in Visual Studio Command Prompt:

tf undo "file_path" /workspace:workspace_name

e.g.:

tf undo $/S/B/ABC/dotNET/Symphony/Tools/xyz/abc/Abc.dll /workspace:Houst01

here it will unlock Abc.dll which is inside abc folder.

To unlock the whole folder in one shot:

tf undo $/S/B/ABC/dotNET/Symphony/Tools/xyz/abc/* /workspace:Houst01

here it will unlock all files which is inside abc folder.

Alex
  • 367
  • 1
  • 3
  • 17
Piyush
  • 5,145
  • 16
  • 49
  • 71
  • 2
    I successfully used your example but had to include the domain and username of the user who had the file/s locked after workspace. E.g /workspace:Houst01;\ – Ryan Spears Oct 17 '12 at 22:19
5

Did you try the TFS Sidekicks from Attrice?

It gives you a graphical interface to do all these commands, which makes it much easier to perform these tasks.

Ewald Hofman
  • 12,688
  • 3
  • 39
  • 44
0

try this in Visual studio command prompt i hope it will work...

 C:\Program Files (x86)\Microsoft Visual Studio 12.0>tf undo
 {tfsfilepath} /Workspace:{tfsusername}

 Undo your changes to {Filepath} (Yes/No) yes
Boopathi.Indotnet
  • 1,280
  • 15
  • 18