microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
226 stars 11 forks source link

[BUG] Long file lock on workspace folder after closing Visual Studio Code #1095

Open ocallesp opened 5 months ago

ocallesp commented 5 months ago

Describe the Issue

After closing a Visual Studio Code workspace which contained a .NET solution, the workspace remains being used by some running processes, often for over a minute or two. Those processes are the following:

dotnet.exe using .git\objects\pack\pack-\<some numbers>.idx

Repro Steps:

  1. Open VSCode
  2. In VSCode clone git repository image
  3. Clone https://github.com/dotnet/project-system.git
  4. Close VSCode
  5. Try to delete the folder of project-system
  6. Open Process Explorer in Windows and go to Find Handle and search for the folder project-system

image

Steps To Reproduce

No response

Expected Behavior

No response

Environment Information

No response

ocallesp commented 5 months ago

I found this issue while trying to debug this other bug https://github.com/microsoft/vscode-dotnettools/issues/716

lifengl commented 2 months ago

I wonder whether any msbuild process could be the reason as the current working directory. After closing VS or workspace all CDK/project system processes would be killed immediately, only msbuild nodes would keep alive so they could be reused in a future session. MsBuild nodes are started by msbuild internally/