user310291
user310291

Reputation: 38190

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.

Upvotes: 10

Views: 14907

Answers (6)

Jelena
Jelena

Reputation: 11

i had the same problem. I go to Terminal and turn off all powershell,a voala I finally can delete folder from VS explorer.

Upvotes: 1

Gustavo Garcia
Gustavo Garcia

Reputation: 31

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

Upvotes: 3

JulienRioux
JulienRioux

Reputation: 3092

I just restart my mac and everything went well after that 🤞

Upvotes: 0

EngineSense
EngineSense

Reputation: 3616

It took 6 hours to find out that.... it can be deleted by VsCode file explorer, if i try to delete it manually it juggles with admin permission and user permission back and fourth.

Just delete the folder from VSCODE file explorer from the left menu.

Upvotes: 0

IndianCoder
IndianCoder

Reputation: 1

Try running Visual Studio in Administrator mode. It worked for me.

Upvotes: 0

BBacon
BBacon

Reputation: 2678

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.

Upvotes: 5

Related Questions