Repository navigation
Description
Relevant area(s)
COM API
Description of the new feature / enhancement
CatalogPackage currently exposes IsUpdateAvailable, which only indicates whether a newer version has an applicable in-place update path.
Please add support to identify reinstall-required updates, where a newer version exists but cannot be upgraded in place and instead requires uninstall + reinstall. A typical example is installer technology mismatch.
This would let API consumers distinguish between:
- No newer version exists
- A newer version exists and is updateable
- A newer version exists but is reinstall-required
Without this distinction, API consumers cannot reliably guide users toward the correct remediation path.
Proposed technical implementation details
Add two new properties to CatalogPackage:
IsReinstallAvailable(Boolean)ReinstallRequiredReason(enum)
Keep IsUpdateAvailable semantics unchanged.
Suggested enum values
NoneInstallerTechnologyMismatchInstalledTypeMismatchInstalledScopeMismatchOther
Expected behavior
-
Applicable update exists
IsUpdateAvailable = trueIsReinstallAvailable = falseReinstallRequiredReason = None
-
Newer version exists, but in-place update is blocked by installer technology mismatch
IsUpdateAvailable = falseIsReinstallAvailable = trueReinstallRequiredReason = InstallerTechnologyMismatch
-
Newer version exists, but is blocked by non-reinstall constraints
For example: OS version, architecture, market, or other general applicability constraints.IsUpdateAvailable = falseIsReinstallAvailable = falseReinstallRequiredReason = Other(orNone, depending on final API design)
-
No newer version exists
IsUpdateAvailable = falseIsReinstallAvailable = falseReinstallRequiredReason = None
Suggested implementation approach
The relevant implementation path appears to be:
RepositoryCore applicability selection
-> COM projection
-> CatalogPackage properties
Concrete areas:
- Extend the result returned by repository-side version selection so it can carry:
- latest applicable version
- update availability
- reinstall availability
- reinstall reason
- Reuse existing installer applicability analysis and mismatch classification already used during upgrade selection.
Potential implementation points:
src/AppInstallerRepositoryCore/Public/winget/PackageVersionSelection.hsrc/AppInstallerRepositoryCore/PackageVersionSelection.cppsrc/AppInstallerCommonCore/Public/winget/ManifestComparator.hsrc/Microsoft.Management.Deployment/PackageManager.idlsrc/Microsoft.Management.Deployment/CatalogPackage.hsrc/Microsoft.Management.Deployment/CatalogPackage.cpp
Compatibility requirements
- Do not change existing IsUpdateAvailable behavior.
- Add new properties in a backward-compatible COM contract version.
- Preserve existing callers that only understand update vs no-update.
Acceptance criteria
- Existing
IsUpdateAvailablebehavior remains backward compatible. - Reinstall-required scenarios are reported deterministically.
- The reason enum is documented and stable.
- API contract versioning remains backward compatible.
- Tests cover:
- update available
- reinstall available
- neither available
Activity