raklos
raklos

Reputation: 28545

How can I check who has a specific file checked out in TFS?

How can I check who has a specific file checked out in TFS?

In Visual Studio 2008, a file in the project is marked as checked out.

Upvotes: 24

Views: 22368

Answers (4)

Maleki
Maleki

Reputation: 1495

If you are meaning through Visual Studio 2008 and not in a programmatic way then a simple method to do so is:

Get to Source Control Explorer (Pull up Team Explorer and Click on Source Control). Then navigate to the file you have are checking on and there is a column for which user has that particular file checked out.

Upvotes: 40

NH.
NH.

Reputation: 2381

Updated answer for Visual Studio 2015

Unfortunately, while you can see the purple person icon (Not to be confused with a Purple People Eater) in the Solution Explorer (indicating someone else has it checked out), you can't see who has it checked out there, and have to go over to the Source Control Explorer and look at the User column:

Source Control Explorer with "User" column

But this still will not show you everyone who has it checked out (instead, users after the first are replaced by [more] as seen above). For this you need to open up Developer Command Prompt for VS2015 (which is just cmd.exe with a preloaded batch file, the shortcut is usually in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2015\Visual Studio Tools ) and type in:

tf status .\proj.csproj /user:*

replacing ".\proj.csproj" with a relative or absolute (starting with TFS's $) path to the item that is checked out.

Upvotes: 0

Tuoski
Tuoski

Reputation: 1081

Visual Studio also has this bad habit. It seems that file is checked out by somebody else in Solution Explorer, but actually it isn't. Refresh doesn't work. Source Control Explorer shows this correctly.

Upvotes: 0

Richard Berg
Richard Berg

Reputation: 20784

Inside Visual Studio, the Solution Explorer interface is fairly limited -- it has to support a standardized feature set in order to interface with all SCC providers.

The Source Control Explorer (view -> other windows -> source control explorer) is native to TFS and much more powerful. Here you can browse the server-side view directly. The details pane on the right has a column where you can see checkout information.

However, if several people have the file checked out, it won't be able to show everything. A complete dump of the checkout records is available from rightclick -> Properties -> Status. Or you can run the command line *tf status $/path/to/item /user:**

Upvotes: 10

Related Questions