How to remove a TFS Workspace Mapping?

前端 未结 21 2124
深忆病人
深忆病人 2020-11-29 16:54

I had a project in tfs within a team project then we moved the project to a different location in another team project.

I had configured Jenkins to connect to the te

21条回答
  •  春和景丽
    2020-11-29 17:32

    Update 2019-01-23

    If you’re repeatedly getting the following error The workspace wkspaceEg does not exist… even after employing the correct username (wkspcOwnerDomain\wkspcOwnerUsername) in the tf workspace command, e.g.,

    tf workspace "wkspaceEg;wkspcOwnerDomain\wkspcOwnerUsername" /collection:http://tfs.example.com:8080/tfs/collectionEg /login:TFSUsername,TFSPassword

    then the tf workfold command may help fix it. See this question.

    If even that doesn’t work and you’re unable/unwilling to use TFS Sidekicks, proceed to the risky last-ditch option below.


    I’m using TFS 2012. I tried everything that was suggested online: deleted cache folder, used the workspaces dropdown, tf workspaces /remove:*, cleared credentials from Control Panel, IE, etc.

    Nothing worked, I believe my workspace got corrupted somehow. Finally, I went to the TFS database and ran the following queries. That worked! Of course be very careful when messing with the database, take backups, etc.

    The database is called Tfs_<>. Ignore the Tfs_Configuration MSSQL database. I'm not sure but if you don't have a Tfs_<> database, settings might be in the Tfs_DefaultCollection database. Mapping is stored in tbl_WorkingFolder.LocalItem.

    /*Find correct workspace*/
    SELECT WorkspaceId, *
    FROM tbl_Workspace
    ORDER BY WorkspaceName
    
    /*View the existing mapping*/
    SELECT LocalItem, *
    FROM tbl_WorkingFolder
    WHERE WorkspaceId = <>
    
    /*Update mapping*/
    UPDATE tbl_WorkingFolder
    SET LocalItem = 'D:\Legacy.00\TFS\Source\Workspaces\teamProjEg' WHERE
    /*LocalItem = NULL might work too but I haven't tried it*/
    WorkspaceId = <>
    

提交回复
热议问题