microsoft / microsoft/vscode-dotnettools

[BUG] moving a C# project and then trying to delete the original folder fails with EBUSY

Open
#1,850 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-project area-project-cps bug
Dominant language
No language data
Stars
321
Forks
54
Avg merge
2d 19h
Merged PRs (30d)
2

Description

Describe the Issue

I created a test project (Blazor WebApp, interactive WebAssembly) and wanted to move the projects to the top level.

In the Explorer view, I moved the Site.Client folder to the solution-level folder (without error), then moved the contents of the Site (server project) folder (without error).

Then to clean-up the old server project folder tried to delete it.

my assumption is that it is locked because it contained a project referenced by the solution, which now has moved.

Steps To Reproduce
  1. create new project, Blazor WebApp, interaction WebAssembly
  2. move the Site.Client up one level to the root folder (workspace\Site\Site.Client => workspace\Site.Client)
  3. move all contents of the Site (server project) project up one level (workspace\Site\Site => workspace\Site)
  4. attempt to delete the now empty Site folder (workspace\Site\Site)
  5. receive error:

[Window Title]
Visual Studio Code

[Content]
Error: EBUSY: resource busy or locked, rmdir 'd:\source\xxx\DynamicalStateArchitectureTest\FrontendSite\FrontendSite'

[Retry] [Cancel]

Expected Behavior

moving folders and project files referenced by a solution does not cause long pauses, EBUSY or "Access Denied" errors.

Environment Information

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the folder moves in the issue using a Blazor WebApp with interactive WebAssembly in Visual Studio Code. Investigate why deleting the now-empty original server-project folder returns EBUSY; done means the move and cleanup complete without long pauses, EBUSY, or access-denied errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, vscode
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.