How to remove a empty folder from a project under

2019-03-09 14:51发布

Suppose I have a project MyLib, under that, I created a folder say Folder1. No file under this folder. The project is connected to TFS.

Then I want to remove this folder Folder1. I deleted it from context menu and checked the project into TFS.

Then I check the data on TFS with Team Explore->Source Control, Folder1 is deleted. But it is still there in VS 2010 on local computer. I closed VS 2020 and deleted Folder1 from widows explore. Then open VS 2010 again, the Folder1 is still there. I can't remove it locally from MyLib!

Confused. How to resolve this problem?

8条回答
来,给爷笑一个
2楼-- · 2019-03-09 15:24

You can try doing Get Specific version. Right Click parent Folder of the file in Source Control and choose Get Specific version.It will open Get window, here choose Type as Latest Version and check the both available Check box options.

查看更多
太酷不给撩
3楼-- · 2019-03-09 15:27

Sorry for the late reply, I missed to check your reply.

The above error suggests that the folder may be Checked out & locked by some other user.

In Source Control, are you able to see the Status of the folder as Checkout & lock?

If yes,can you use Status Sidekick of TFS Sidekicks tool and try to unlock the folder (http://www.attrice.info/cm/tfs/).

Then, try to delete the folder again.

查看更多
爱情/是我丢掉的垃圾
4楼-- · 2019-03-09 15:33

Just create a file in it (a class file for example) - check in, then after it checks in (successfully) - delete and it will do.

So simply put: check in and then delete and it will work..

查看更多
狗以群分
5楼-- · 2019-03-09 15:35

Simply create a file within the folder and delete it along with the new file. TFS has some problems with empty folders when you try to delete them.

查看更多
相关推荐>>
6楼-- · 2019-03-09 15:36

If you right click on the project and select edit project file, you can then delete the entry for the offending folder. After you save and reload the project, you can then delete the folders from your hard drive and then source control.

查看更多
我欲成王,谁敢阻挡
7楼-- · 2019-03-09 15:37

I tried the solution that to add a new file then delete the folder with the file but failed.

My solution was to delete the physical folder first, then sign-in the code to TFS. (You will see the change list include the deletion of the folder.)

After sign-in, you will be able to delete the folder in your solution explorer.

查看更多
登录 后发表回答