Tuesday, December 21, 2010

Grrrr TFS Crashed Build Locked Files

Today I had to fix a build issue, which are few and far between these days with TFS 2010.  By and large I love it, it has a huge array of features and advancements over previous version. And sure beats the hell out of Subversion for features and ease of use.

The build crashed after someone managed to checked in the wrong version of / or corrupt DLLs. The result was files locked by the build machine that could not be rolled back or checked out.

When I attempted to check out the files to roll them back obviously being locked I got the error message below..."is locked for check-out by..."
This problem cannot be solved by using the IDE. Only the command line can fix this.  The good news is its totally doable and the above error gives you the workspace name you need.

Jump into a Visual Studio 2010 Command Prompt window and type the following:

TF undo /workspace:<WorkspaceNameGivenInOutput> "<FullPathToFileToUndo>" /collection:<FullHttpUrlIncludingPortNumberAndCollectionProjectName>

No comments:

Post a Comment