[NETSDKE2E][Dotnetup] 'dotnetup sdk uninstall 8.0' removes unrelated SDK 10.0.204.
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
### Prerequisites
- [x] I have read the [dotnetup documentation](https://github.com/dotnet/sdk/tree/release/dnup/documentation/general/dotnetup).
- [x] I have searched for [existing dotnetup issues](https://github.com/dotnet/sdk/issues?q=is%3Aissue%20state%3Aopen%20label%3Adotnetup).
- [x] I have searched for [existing dotnetup discussions](https://github.com/dotnet/sdk/discussions/categories/dotnetup).
### Issue type
Bug report
### Description
**Install Steps:**
Clean machine: Win11 x64 25H2
Install dotnetup tool: iwr https://aka.ms/dotnetup/get-dotnetup.ps1 | iex
**Steps to reproduce:**
1. Lanuch PowerShell -> Execute below commands:
2. cat .\global.json
{
"sdk": {
"version": "10.0.200",
"rollForward": "latestPatch"
}
}
3. dotnetup sdk install
4. dotnetup list -> check .NET SDK 10.0.204 installed by it
5. modify the global.json file as below:
cat .\global.json
{
"sdk": {
"version": "10.0.200",
"rollForward": "latestFeature"
}
}
6. dotnetup sdk install
8. dotnetup sdk install 8.0
9. dotnetup list -> ‘10.0.204’,'10.0.302','8.0.423' are listed.
10. dotnetup sdk uninstall 8.0
**Actual Results:**
'dotnetup sdk uninstall 8.0' removes unrelated SDK 10.0.204.
Repro screenshot:
Repro demo:
**Expected Results:**
It should just uninstall 8.0 sdk info.
### dotnetup version
0.1.4-preview.6.26358.1+5a6ef780cc88ce7bcafcb3a9c5cfc70da5c3a313
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the problem with the shown global.json files and the dotnetup sdk install, list, and uninstall commands on Windows. Start at the dotnetup sdk uninstall command entry point and trace how the requested 8.0 SDK is selected. Done means uninstalling 8.0 leaves unrelated SDK 10.0.204 installed, with a regression test covering this scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100