dotnet / dotnet/vscode-dotnet-runtime

[NETE2ESDK][Windows]Uninstalling should be failed if the runtime files are open in another program

Open
#2,242 3 comments 1 reaction 0 assignees View on GitHub
bug enhancement good first issue P2
Dominant language
TypeScript
Stars
209
Forks
455
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug.

In output, it shows that the runtime is uninstalled successfully even though the runtime files are open in another program

### Please attach log file(s) here if you have any.

[logs.zip](https://github.com/user-attachments/files/19753720/logs.zip)
The log file location should be copied to your clipboard if you came from VS Code.

### Reproduction Steps

1. On Windows, launch VSCode and run 'Sample: Acquire .NET runtime' and enter a version like 8.0.
2. After installed successfully, open cmd and go to the installed runtime file path, so that the runtime files are open in cmd.

![Image](https://github.com/user-attachments/assets/baaa8d85-9e23-4dde-b183-d717190e4208)

4. On VSCode, run '.NET Install Tool: Uninstall .NET' to uninstall the runtime.
5. Observe
### Expected Behavior

Uninstalling should be failed if the runtime is open in another program

### Exceptions & Errors (if any)

In output, it shows that the runtime is uninstalled successfully, but the runtime files are not deleted.

![Image](https://github.com/user-attachments/assets/2df1bfb8-8346-4b6e-a775-3ad84c5ac821)

Note:
1. This issue is also repro on v2.3.2 and v2.3.1

### .NET Install Tool Version

v2.3.3

### Your operating system? Please provide more detail, such as the version and or distro above.

Windows

### VS Code Version

1.99.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.