如何删除/修复幻影工作区 [英] How can I remove/fix a ghost workspace

查看:181
本文介绍了如何删除/修复幻影工作区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不知何故,我最终遇到了一个鬼"工作区.它不会显示在Visual Studio的管理工作区"下.当我连接到VS Team Services并打开开源控件资源管理器时,它会弹出一个带有TF14061的错误对话框(工作空间不存在")

Somehow I have ended up with a "ghost" workspace. It doesn't show up in Visual Studio under Manage Workspaces. When I connect to VS Team Services and open source control explorer it pops up an error dialog with TF14061 ("The workspace does not exist")

当我尝试从同伴中删除它时,也会导致TF14061:

When I try to delete it from sidekicks it also results in TF14061:

tf vc workspace "MYCOMPUTER;My Name" /delete /collection:https://me.visualstudio.com/defaultcollection

TF14061: The workspace MYCOMPUTER;My Name does not exist.

在计算机上搜索架子集时,我可以看到工作区:

I can see the workspace when searching for shelvesets on my computer:

tf workspaces /computer:MYCOMPUTER /owner:* /collection:https://me.visualstudio.com/defaultcollection

结果:

=======================================================================================================================
Workspace  : MYCOMPUTER
Owner      : My Name
Computer   : MYCOMPUTER
Comment    :
Collection : https://me.visualstudio.com/defaultcollection
Permissions: Private
Location   : Server
File Time  : Current

Working folders:
$/: C:\local

仅通过工作空间名称或所有者名称搜索工作空间根本不会返回工作空间.

Simply searching for the workspace by workspace name or by owner name does not return the workspace at all.

我试图创建一个新的工作区并将其映射到相同的文件夹,但是我收到错误消息,该文件夹已被映射到另一个工作区中.

I am trying to create a new workspace and map it to the same folder but I'm getting the error that this folder is already mapped in another workspace.

如何删除该幻影工作区?

How can I remove this phantom workspace?

附加信息 即使所有者相同,这些重复工作区的安全性令牌似乎也不同.一个与我的Azure AD帐户匹配,另一个与我的Microsoft帐户匹配.这很奇怪,因为我的Microsoft帐户对此服务器没有权限.

Additional information It appears the security tokens for these duplicate workspaces are different even though the owner is the same. One matches the my Azure AD account, the other matches my Microsoft Account. This is odd, since my Microsoft Account has no permission on this server.

注意:我正在使用Visual Studio Team Services.

Note: I'm using Visual Studio Team Services.

推荐答案

您可以使用 tf工作区命令来获取所有工作区的详细XML信息,包括所有者的唯一ID和所有者别名的用户名:

You can use tf workspaces command to get detailed XML info for all workspaces, including owner uniqe id and owner alias user names:

tf workspaces /owner:* /format:xml

示例输出:

<Workspace computer="computer" name="wrkspacename" ownerdisp="Some Name" 
    ownerid="S-1-5-00-0000000000-0000000000-000000000-0000" 
    ownertype="System.Security.Principal.WindowsIdentity"
    owner="12345678-90ab-cdef-1234-567890abcdef"
    owneruniq="12345678-90ab-cdef-1234-567890abcdef">
  <Comment />
  <Folders>
    <WorkingFolder local="C:\Folder" item="$/Folder" />
  </Folders>
  <LastAccessDate>2019-01-01T01:02:03.456+00:00</LastAccessDate>
  <OwnerAliases>
    <string>SERVER\Name</string>
    <string>Name</string>
    <string>Some Name</string>
  </OwnerAliases>
</Workspace>

然后您可以尝试使用某些 OwnerAliases 作为所有者删除工作区,或直接使用 owneruniq :

You can then try some of the OwnerAliases as owner to delete workspace or directly use owneruniq:

tf workspace /delete wrkspacename;12345678-90ab-cdef-1234-567890abcdef

这篇关于如何删除/修复幻影工作区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆