Monday, March 04, 2013

Accessing a TFS file that has not been checked in (by someone other than you)

In the scenario where a member of your team has checked out a file, disappeared from the company, thus rendering their profile/machine unusable, take the following steps to rectify the situation:


  1. Open a Visual Studio command prompt
  2. Type the following: tf undo /workspace:OtherUserWorkSpace;OtherUser $/Project/ItemName.cs


Replace 'OtherUserWorkspace' with the workspace name where the file is checked out (i.e. the user's computer name)
Replace 'OtherUser' with the username that has checked out the file
Replace '$/Project/ItemName.cs' with the full path (including all namespaces) with the file that needs to be undone

Example:

tf undo /workspace:WRK0130-PC;rbobby $/MISV2/www/Web.config.

You'll get an error such as the following when you first attempt to access the file:




No comments:

Fixes to common .NET problems, as well as information on .NET features and solutions to common problems that are not language-specific.

Fixes to common .NET problems, as well as information on .NET features and solutions to common problems that are not language-specific.

Z