Sunday, May 18, 2008

Unlocking locked files on Team Foundation Server

Some time ago, working on Team Foundation Server 2005, I have to unlock a number of files locked by other users (for example, files locked in an unavailable Work Area). After some search in Microsoft Newsgroups and in technical documents, i can build a working procedure to unlock them:

1. On command prompt, go to C:\Program Files\Microsoft Visual Studio 8\Common7\IDE on TFS server

2. Write:
“tf lock $/ProjectName/LockedFileName /lock:none /workspace:WorkArea;UserThatLocks /server:TFSServerName

4. Write:
“tf undo $/ProjectName/LockedFileName /workspace:WorkArea;UserThatLocks /server:TFSServerName

No comments: