microsoft / microsoft/winget-pkgs

[Package Issue]: Microsoft.DotNet.SDK.7

Open
#117,605 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug
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
  1. Install Microsoft.DotNet.SDK.7 version 7.0.307
  2. winget upgrade
  3. It shows and available update (7.0.400 at this moment)
  4. winget upgrade --all / winget upgrade --exact --id Microsoft.DotNet.SDK.7
  5. The latest version is installed
  6. winget upgrade
  7. It still shows the previous version 7.0.307 (and there's no mention of the latest 7.0.400)
  8. winget list
  9. 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 list shows both versions
  • winget list --upgrade-available shows the old version
  • winget list Microsoft.DotNet.SDK.7 shows only the new version
  • winget list Microsoft.DotNet.SDK.7 --upgrade-available shows that there are no packages matching criteria
  • winget upgrade shows upgrade available for the old version
  • winget uninstall --exact --id Microsoft.DotNet.SDK.7 --version 7.0.307 runs the uninstaller for the latest version 7.0.400
    So you can't even install new -> uninstall old with winget.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.