0

I am having an issue where a .cs class in my entity framework (edmx) is checked out in another workspace, but doesn't exist in TFS:

When I attempt to add the file to TFS I get:

TF10151: Cannot lock item $/[...]/CLP.cs for check-out.  The item $/[...]/CLP.cs is checked out by [User] in workspace [Workspace].

The checkout does not show in TFS Sidekick Status and I have even tried the following command using Developer Command Prompt but I get 'It is not currently locked in your workspace':

tf undo "$/[...]/clp.cs" /collection:[My Collection] /workspace:[Workspace];[User]

Any idea? The workspace in question goes back a year or so for somebody who no longer works for the company. Seems like it's a ghost file that TFS has some sort of reference to but doesn't actually exist? Perhaps it's getting confused with the edmx file?

Any fix or work around would be much appreciated as it's stopping us from using automated builds.

Thanks

1 Answers1

0

If the developer no longer works for the organisation then you can just delete the workspace.

You will probably need project administrator permissions to do this.

This question has a bunch of answers that should show you how to do this

James Reed
  • 13,873
  • 51
  • 60
  • Worked great, thanks. Didn't think just to delete the Workspace. Quite odd the file didn't show up as being checked out though – Andrew Dally Nov 20 '18 at 15:04
  • It might have been as Pending "Add" so TFS knew about the file and it's name but it had never actually been checked in. Or perhaps a delete and add. Server workspaces can be a pain sometimes – James Reed Nov 20 '18 at 17:02
  • Ah, that may explain it as I don't actually recall ever seeing it in TFS since we moved. Thanks again – Andrew Dally Nov 22 '18 at 12:25