Skip to content

Fix missing WinGet updates (issue 4545)#4547

Merged
Gabriel Dufresne (GabrielDuf) merged 3 commits intomainfrom
MissingWinGetUpdates
Apr 3, 2026
Merged

Fix missing WinGet updates (issue 4545)#4547
Gabriel Dufresne (GabrielDuf) merged 3 commits intomainfrom
MissingWinGetUpdates

Conversation

@GabrielDuf
Copy link
Copy Markdown
Contributor

Problem

Users reported that some packages shown as upgradable by winget upgrade were not appearing in the UniGetUI updates list. This regression was introduced in d324a0f, which changed WinGet COM activation to prefer the bundled in-proc DLL over the system COM registration.
The bundled WindowsPackageManager.dll does not reliably populate IsUpdateAvailable when the composite catalog uses CompositeSearchBehavior.LocalCatalogs, causing most updates to be silently skipped.

Fix

Introduced GetWinGetPackagesForUpdates(), a dedicated catalog query method for update detection that uses CompositeSearchBehavior.RemotePackagesFromAllCatalogs. This mirrors the behavior of winget upgrade internally and correctly resolves update availability against remote catalog data regardless of which COM activation mode is in use.

The existing GetLocalWinGetPackages() with LocalCatalogs is preserved for installed packages listing, where it
remains correct and efficient.

Also added an explicit null guard on DefaultInstallVersion in GetAvailableUpdates_UnSafe() to surface skipped
packages as warnings rather than silent exceptions.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a regression in WinGet update detection where packages reported by winget upgrade were not being surfaced in UniGetUI’s updates list when using bundled in-proc COM activation.

Changes:

  • Switched WinGet update enumeration to use a dedicated composite catalog query (RemotePackagesFromAllCatalogs) intended to match winget upgrade’s behavior.
  • Added a null-guard for DefaultInstallVersion to avoid exceptions and log skipped packages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@GabrielDuf Gabriel Dufresne (GabrielDuf) merged commit bcb80f5 into main Apr 3, 2026
1 check passed
@GabrielDuf Gabriel Dufresne (GabrielDuf) deleted the MissingWinGetUpdates branch April 3, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants