TFS 2010 - 在签入更改之前删除 Visual Studio 解决方案中的文件夹
我们正在使用 TFS 2010,并在删除 Visual Studio 解决方案内的文件夹时遇到问题。
在签入代码的最新版本中,相关目录中包含文件。
一位开发人员决定将该目录中的文件移动到解决方案中的另一个位置。然后,他尝试删除旧文件夹,但出现以下错误:
This operation cannot be completed.
You are attempting to remove or delete a source-controlled item where the item is either exclusively locked elsewhere or otherwise unable to be deleted from source control.
有谁知道尝试执行此操作会出现什么问题,有没有办法解决它?
We are using TFS 2010 and facing a problem with deleting a folder inside of a solution in Visual Studio.
In the latest version of checked-in code, the directory in question has files in it.
One of the developers decided to move the files in that directory to another location within the solution. He then tried to delete the old folder but go the following error:
This operation cannot be completed.
You are attempting to remove or delete a source-controlled item where the item is either exclusively locked elsewhere or otherwise unable to be deleted from source control.
Does anyone know what the problem is with trying to do this and is there a way to get around it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您无法删除对其任何子项有挂起更改的文件夹(包括如果这些子项中的任何一个被移出该文件夹 - 在签入该变更集之前它们仍然是子项。)
您必须在两个步骤:首先,将子文件夹移出文件夹并签入这些更改,然后将该文件夹作为单独的更改集删除。
You cannot delete a folder that has pending changes on any of its children (including if any of those children are being moved out of the folder - they're still children until that changeset is checked in.)
You'll have to do this in two steps: first, move the children out of the folder and check those changes in, then delete the folder as a separate changeset.
如果要删除的文件夹存在于本地计算机上,只需从 Visual Studio IDE 中向该文件夹添加一个新文件(无论文件类型如何)。然后你应该能够从 VS 中删除该文件夹。
如果该文件夹已从本地计算机中删除,请创建一个具有相同名称的新文件夹,然后按照上述步骤操作。
If the folder you want to delete exists on your local machine, just add a new file to the folder from within the Visual Studio IDE (it doesn't matter what type of file). Then you should be able to delete the folder from within VS.
If the folder was deleted from your local machine, create a new one with the same name and then follow the above steps.