microsoft / microsoft/winget-cli

winget doesn't go from highest to lowest dependency version to resolve installer

Open
#5,902 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dependencies Issue-Bug
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Git for Windows removed x86 support some time ago, but TortoiseGit still supports it. As it turns out, when define Git.Git as dependency winget only tries the latest Git version which is 64, arm64 only now and fails to resolve x86 installer:

2025-11-28 08:45:09.026 [CLI ] Market Filter created with market: DE
2025-11-28 08:45:09.026 [CLI ] Locale Comparator created with Required Locales: [] , Preferred Locales: [de-DE] , IsInstalledLocale: 0
2025-11-28 08:45:09.026 [CLI ] Architecture Comparator created with allowed architectures: [X86, Neutral]
2025-11-28 08:45:09.026 [CLI ] Starting installer selection.
2025-11-28 08:45:09.027 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:45:09.027 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:45:09.027 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:45:09.027 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:45:09.028 [CLI ] No suitable installer found for manifest Git.Git with version 2.52.0
2025-11-28 08:45:09.028 [REPO] Search request meets optimized search criteria.

but trying to install git works fine as it picks the latest version 2.48.1 with x86 installer:

image

And winget always trying to use last version of dependency and can't fall back to older matching version. But during normal install winget fins the best matching version starting from newest down to older versions until it finds the correct installer:

2025-11-28 08:48:35.629 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.52.0/eae0]
2025-11-28 08:48:35.629 [YAML] Detected UTF-8
2025-11-28 08:48:35.631 [CLI ] Starting installer selection.
2025-11-28 08:48:35.631 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.631 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.631 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.631 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.632 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.51.2/4f3e]
2025-11-28 08:48:35.678 [YAML] Detected UTF-8
2025-11-28 08:48:35.681 [CLI ] Starting installer selection.
2025-11-28 08:48:35.681 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.681 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.681 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.681 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.681 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.51.1/02b1]
2025-11-28 08:48:35.722 [YAML] Detected UTF-8
2025-11-28 08:48:35.724 [CLI ] Starting installer selection.
2025-11-28 08:48:35.724 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.724 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.724 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.724 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.725 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.51.0.2/8696]
2025-11-28 08:48:35.757 [YAML] Detected UTF-8
2025-11-28 08:48:35.760 [CLI ] Starting installer selection.
2025-11-28 08:48:35.760 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.760 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.760 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.760 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.760 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.51.0/8696]
2025-11-28 08:48:35.799 [YAML] Detected UTF-8
2025-11-28 08:48:35.801 [CLI ] Starting installer selection.
2025-11-28 08:48:35.801 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.801 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.801 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.801 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.801 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.50.1/8696]
2025-11-28 08:48:35.842 [YAML] Detected UTF-8
2025-11-28 08:48:35.844 [CLI ] Starting installer selection.
2025-11-28 08:48:35.844 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.844 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.844 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.845 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.845 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.50.0.2/8696]
2025-11-28 08:48:35.883 [YAML] Detected UTF-8
2025-11-28 08:48:35.886 [CLI ] Starting installer selection.
2025-11-28 08:48:35.886 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.886 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.886 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.886 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.886 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.50.0/8696]
2025-11-28 08:48:35.923 [YAML] Detected UTF-8
2025-11-28 08:48:35.925 [CLI ] Starting installer selection.
2025-11-28 08:48:35.925 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.925 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.925 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.925 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.926 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.49.0/8696]
2025-11-28 08:48:35.966 [YAML] Detected UTF-8
2025-11-28 08:48:35.968 [CLI ] Starting installer selection.
2025-11-28 08:48:35.968 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.968 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:35.968 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.968 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:35.969 [CORE] Reading cached file [C:\Users\Andre\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/g/Git/Git/2.48.1/8696]
2025-11-28 08:48:36.007 [YAML] Detected UTF-8
2025-11-28 08:48:36.009 [CLI ] Starting installer selection.
2025-11-28 08:48:36.009 [CLI ] Installer [X86,inno,User,] is current best choice
2025-11-28 08:48:36.009 [CLI ] Installer [X86,inno,User,] is better [strong] than [X86,inno,Machine,] due to: Scope
2025-11-28 08:48:36.009 [CLI ] Installer [X64,inno,User,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:36.009 [CLI ] Installer [X64,inno,Machine,] not applicable: Machine is not compatible with X64
2025-11-28 08:48:36.009 [CLI ] Installer [Arm64,inno,User,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:36.009 [CLI ] Installer [Arm64,inno,Machine,] not applicable: Machine is not compatible with Arm64
2025-11-28 08:48:36.009 [CLI ] Completed installer selection.
2025-11-28 08:48:36.009 [CLI ] Selected installer Architecture: 1
2025-11-28 08:48:36.009 [CLI ] Selected installer URL: https://github.com/git-for-windows/git/releases/download/v2.48.1.windows.1/Git-2.48.1-32-bit.exe
2025-11-28 08:48:36.009 [CLI ] Selected installer InstallerType: inno

So, now we need to figure out a way to force winget to do the same when git is defined as dependency.

Originally posted by @MagicAndre1981 in https://github.com/microsoft/winget-pkgs/issues/314972#issuecomment-3588288697

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 tracing dependency resolution for Git.Git into the installer-selection path, comparing it with the normal install flow shown in the logs. Done means dependency installation can fall back from version 2.52.0 to an older version with a compatible x86 installer.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.