dotnet / vscode-dotnet-runtime

VSCode Extension for Installing .NET via VS Code
MIT License
138 stars 251 forks source link

[NETE2ESDK] The SDK uninstalled through the control panel is still displayed in the list when running the ‘.NET Install Tool: Uninstall .NET’ command #1918

Open v-xiaofchen opened 3 weeks ago

v-xiaofchen commented 3 weeks ago

Describe the bug.

The SDK uninstalled through the control panel is still displayed in the list when running the ‘.NET Install Tool: Uninstall .NET’ command

Reproduction Steps

  1. Run the command ‘.NET Install Tool: Install .NET SDK System-Wide' to install the .NET SDK and enter the newest version.
  2. Uninstall the installed SDK through the control panel
  3. Open the command palette and run the ‘.NET Install Tool: Uninstall.NET’ command
  4. Observe

Expected Behavior

The SDK uninstalled through the control panel should not appear in the list

Exceptions & Errors (if any)

The SDK uninstalled through the control panel is still displayed in the list when running the ‘.NET Install Tool: Uninstall .NET’ command image

.NET Install Tool Version

2.1.2

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

N/A

VS Code Version

1.92.2

v-xiaofchen commented 3 weeks ago

This issue also repro on MAC when manually uninstalling the SDK using the script refer to this https://learn.microsoft.com/en-us/visualstudio/mac/uninstall-net-2022?view=vsmac-2022#uninstall-net-from-your-machine

nagilson commented 3 weeks ago

That's a good point. This is expected behavior but might cause confusion -- uninstalling it will should/(will be, based on my testing) a no-op where nothing happens, which is fine. The uninstallation feature is currently only for installations that were managed by the extension, it does not have knowledge of other installations.

This also means SDKs showing in the control panel will not appear here if they weren't installed via our tool.

cc @baronfel @webreidi if you think we need to do anything about the messaging for this

webreidi commented 3 weeks ago

We'll need to make sure that documentation for this is clear that it will only list SDKs that were installed through VS Code. I can't think of any easy way to make that clear in the list itself. And the tool is only meant to provide a way to clean up what we initiated/enabled, so I don't think we need to provide access to remove all SDKs.

nagilson commented 3 weeks ago

Thank you, I agree.

v-xiaofchen commented 3 weeks ago

Thanks for your explanation!🙂