Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot delete folder in Visual Studio Code definitely

I deleted a folder in Visual Studio Code to recreate it. But each time it recovers all files whereas I just want to create a new empty folder with same name.

like image 807
user310291 Avatar asked Feb 17 '18 22:02

user310291


People also ask

How do I delete a folder in Visual Studio 2019?

In either Solution Explorer or Source Control Explorer, browse to the folder or file that you want to delete. Select the items that you want to delete, open their context menu (right-click), and choose Delete.


2 Answers

This is a common issue that I am also facing for more then a year now and I am unable to find an open issue about this on Github. Every issue related to this that is opened gets closed because the developers are unable to find the source of the problem.

One way I could sometimes replicate the issue is to:

  1. Open the project folder in Windows Explorer
  2. Search for something inside VSCode that is contained in the folder you are going to delete.
  3. Try to delete the folder in VSCode.
  4. Folder is not deleted.

Clearing the search after does not solve the issue. Most of the times I have to close and reopen VSCode.

Another ridiculous part is that the VSCode sends the file to the OS Trash and you are unable to undo the deletion when it works (CRTL + Z). VSCode is being pushed to the community by many developers but is really an infant editing tool that is terrible, the only amazing part of it is the huge ammount of plugins.

This is a long lasting bug that occurs ALL THE TIME with me. I know this is not a valid answer, but it's what I know about this problem this far.

like image 93
BBacon Avatar answered Sep 24 '22 18:09

BBacon


i had the same problem. But works turn off malwarebytes. Maybe another antivirus is blocking to delete folders to, try this.

like image 43
Gustavo Garcia Avatar answered Sep 23 '22 18:09

Gustavo Garcia