web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Files are locked in TFVC by another user

(2) ShareShare
ReportReport
Posted on by 8
Hello,
I am having an issue with VS 2019 TFVC.
Every objects are configured such that anyone who edits a particular object (class, table, project, etc), the files are locked to that user in the workspace.
Other users cannot perform modification on that particular object.
I have an external user who was using a virtual machine and there were some objects that were locked in that workspace.
Before leaving the company, he has deleted the virtual machine dev09 but the files that were locked are still locked in that workspace (dev09).
His workspace was set to private and it inaccessible to anyone.
Is there any way to fix this issue and unlock these files as we are in need to edit some of the objects for development?
I have the same question (0)
  • Martin Dráb Profile Picture
    238,828 Most Valuable Professional on at
    It's possible, either from Source Control Explorer or command line, you just need UnlockOther permission.
     
    With sufficient permissions, you can also delete someone else's workspace.
  • Jason0810M Profile Picture
    8 on at
    Hello Martin,
    I have tried to ask the admin team to unlock as I don't have the rights but they are unable to run the command to unlock for this particular user/workspace and the account has been deleted from the system.
    It seems that deletion of the workspace is the only solution now.
  • Verified answer
    Anthony Blake Profile Picture
    3,070 Super User 2026 Season 1 on at
    Make sure your workspaces are set to public to avoid in future, you probably know that now but this is something I've had multiple times in the past.
     
    Try this:
     
    tf vc workspaces "<ENVIRONMENTNAME>;<USER>" /computer:* /format:xml /collection:https://YOURPROJECT.visualstudio.com/ 
     
    This should give you an xml output so you can get the owner ID
     
    Then use this command to delete the workspace:
     
    tf workspace /delete "<ENVIRONMENTNAME>;<OWNERID>" /collection:https://YOURPROJECT.visualstudio.com/ 
     
    I've found these a real pain to clean up, it may be worth deploying a new dev environment.
     
    Other suggestions:
     
     

    From the link:

    You can get a list of all workspaces by bringing up a Visual Studio Command Prompt then changing to your workspace folder and issuing the following commands:

    C:\YourWorkspaceFolder>tf workspaces /owner:*
    

    You should see your problem workspace in the list as well as it's owner.

    You can delete the workspace with the following command:

    C:\YourWorkspaceFolder>tf workspace /delete /server:BUILDSERVER WORKSPACENAME;OWNERNAME

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 517 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 440

#3
Adis Profile Picture

Adis 266 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans