microsoft / microsoft/winget-pkgs
[Package Issue]: Microsoft.DotNet.SDK.7
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 11.1k
- Forks
- 9.7k
- Avg merge
- 1h 32m
- Merged PRs (30d)
- 376
Description
Please confirm these before moving forward
- I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
- I have not been informed if the issue is resolved in a preview version of the winget client.
Category of the issue
Multiple installed packages found.
Brief description of your issue
winget upgrade --all / winget upgrade --exact --id Microsoft.DotNet.SDK.7 doesn't upgrade the .NET SDK, but instead installs new side-by-side
Similar issue, when the user got confused: #107081
Steps to reproduce
- Install Microsoft.DotNet.SDK.7 version 7.0.307
winget upgrade- It shows and available update (7.0.400 at this moment)
winget upgrade --all/winget upgrade --exact --id Microsoft.DotNet.SDK.7- The latest version is installed
winget upgrade- It still shows the previous version 7.0.307 (and there's no mention of the latest 7.0.400)
winget list- It shows Microsoft.DotNet.SDK.7 installed multiple times - both the old and the new versions.
Actual behavior
The latest Microsoft.DotNet.SDK.7 version is installed in addition to the old one(s) / side-by-side
Expected behavior
The not-pinned installed version of Microsoft.DotNet.SDK.7 package is updated to the latest version available.
Except for the pinned versions, the latest version of Microsoft.DotNet.SDK.7 should be the only remaining after the upgrade.
The versions from Visual Studio should not be included in this upgrade process - they should be excluded / pinned automatically / marked as some other software. This is a separate issue, but related.
Environment
Windows Package Manager (Preview) v1.6.1573-preview
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22621.2134
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.21.1573.0
Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Links
---------------------------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale
Admin Setting State
--------------------------------------------------
LocalManifestFiles Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Disabled
LocalArchiveMalwareScanOverride Disabled
Microsoft.DotNet.SDK.7 installed only from winget. Visual Studio hasn't been installed on this machine yet.
Screenshots and Logs
No response
Other
As a result, these (common?) issues occur for .NET 7 SDK package:
winget listshows both versionswinget list --upgrade-availableshows the old versionwinget list Microsoft.DotNet.SDK.7shows only the new versionwinget list Microsoft.DotNet.SDK.7 --upgrade-availableshows that there are no packages matching criteriawinget upgradeshows upgrade available for the old versionwinget uninstall --exact --id Microsoft.DotNet.SDK.7 --version 7.0.307runs the uninstaller for the latest version 7.0.400
So you can't even install new -> uninstall old with winget.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with the reported winget upgrade, list, and uninstall commands using Microsoft.DotNet.SDK.7 versions 7.0.307 and 7.0.400. Trace the package upgrade and installed-package selection entry points; done means the unpinned package upgrades without leaving the old version incorrectly reported, while pinned or Visual Studio versions retain their stated behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100