Search code examples
tfstfvctfs-2018

Cant get rid of a workspace problem in TFS2018 after migration


I have a problem after migrating from TFS2013 to TFS2018. This happened after a major rebuild of our system. I migrated the TFS DB and software and can check all things in the web browser where it looks ok. I deleted all workspaces on the Server.

Example of my problem: I opened with VS2019 a project (WOL) and tried to connect to the TFS server. I got a suggested workspace directory:

C:\Users\Juergen.JLOEWNEREDV\Source\Workspaces\WOL

I tried to change this to another local directory where the project already exists for its lifetime:

D:\Visual Studio Projekte\WOL

(As the TFS server was longer time offline, there were many changes to the project which I want to check in now) On this try I get the following message:

The working folder
*D:\Visual Studio Projekte\WOL*
is already in use by the workspace JLOEWNER;Juergen Loewner on computer JLOEWNER.

I found no way how to get rid of this.

Can anybody help me?

There are many more projects pending for check in. So I need a general procedure which solves this problem.


Solution

  • The error message is The working folder D:\Visual Studio Projekte\WOL is already in use by the workspace JLOEWNER;Juergen Loewner on computer JLOEWNER.

    The variable D:\Visual Studio Projekte\WOL stands for the blocked folder, JLOEWNER for the workspace/machine name and Juergen for the users id on Azure DevOps Server(TFS2018).

    We could run the tf.exe cmd to delete Remote Workspace.

    Steps:

    Run Developer Command Prompt with Administrator privileges from Visual Studio 2019 and login with your Azure DevOps credentials. If the Login dialog doesn’t show up, force it by executing:

    tf.exe workspace
    

    Get a list of all remote workspaces available in your DevOps Collection by running the command:

    tf.exe workspaces /computer:* /owner:* /format:xml > c:\temp\workspaces.xml
    

    Find the abandoned workspace in the list and note its name and ownerid for running the command:

    tf workspace /delete {WORKSPACE.name};{WORKSPACE.ownerid}
    

    We could check this blog for more details.

    Or refer to this ticket to remove the workspace, then it should be work.