dotnet / dotnet/vscode-dotnet-runtime

.NET Install Tool trying to remove ever higher versions and not completing

Open
#2,264 1 comment 0 reactions 0 assignees View on GitHub
needs more info resolved-upcoming-release
Dominant language
TypeScript
Stars
209
Forks
455
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug.

The output for .NET Install Tool is continually outputting this as it seems to try to uninstall ever higher versions:

```
Uninstalled .NET 38324.
Attempting to remove .NET 38325.
Attempting to remove .NET 38325.
Uninstalled .NET 38325.
Uninstalled .NET 38325.
Attempting to remove .NET 38326.
Attempting to remove .NET 38326.
Uninstalled .NET 38326.
Uninstalled .NET 38326.
Attempting to remove .NET 38327.
Attempting to remove .NET 38327.
Uninstalled .NET 38327.
```

This goes on forever and never completes (perhaps it completes at integer max value?).

The log file "C:\Users\USER\AppData\Roaming\Code\logs\20250507T093619\window1\exthost\output_logging_20250507T093728\7-.NET Install Tool.log" grows and grows.

The log file starts with the lines:

```
ms-dotnettools.csdevkit requested to download the .NET ASP.NET Runtime.
Downloading .NET version(s) 9.0.4~x64~aspnetcore ................ Done!
.NET 9.0.4~x64~aspnetcore executable path: c:\Users\USER\AppData\Roaming\Code\User\globalStorage\ms-dotnettools.vscode-dotnet-runtime\.dotnet\9.0.4~x64~aspnetcore\dotnet.exe

Attempting to remove .NET 0.
Attempting to remove .NET 0.
Uninstalled .NET 0.
Uninstalled .NET 0.
```

And is now at:

```
Attempting to remove .NET 48728.
Attempting to remove .NET 48728.
Uninstalled .NET 48728.
Uninstalled .NET 48728.
```

But it seems it will grow forever.

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

The log file location should be copied to your clipboard if you came from VS Code.

### Reproduction Steps

I open a solution containing a .NET Core Web project and an angular project in "Visual Studio 2022". From within "Visual Studio 2022" I use the "Developer PowerShell" to open the angular project in "Visual Studio Code"

```console
code ./AngularApp
```

Once I do the .NET Install Tool starts with continually trying to remove .NET versions with ever higher version numbers.

![Image](https://github.com/user-attachments/assets/e1ed83ff-f330-4e6a-986c-05c3b2a2cf83)

### Expected Behavior

The process should complete at some point in time.

### Exceptions & Errors (if any)

_No response_

### .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.3

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.