microsoft / microsoft/winget-cli
Surface reinstall-required availability in WinGet CLI, PowerShell Module, and DSC Resource
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Relevant area(s)
WinGet CLI, PowerShell Module, DSC Resource
Description of the new feature / enhancement
After API support exists for IsReinstallAvailable and ReinstallRequiredReason, surface this information in user-facing tools and automation surfaces.
Without surfacing, users and scripts still cannot reliably act on reinstall-required updates.
This would improve:
- CLI guidance when a normal update is not possible
- PowerShell automation that needs to branch between update and reinstall
- DSC compliance/reporting for packages where the latest version requires reinstall
Proposed technical implementation details
This issue depends on the API/core feature that introduces:
IsReinstallAvailableReinstallRequiredReason
Requested client surfacing
WinGet CLI
Surface clear and actionable messaging when:
- a newer version exists
IsUpdateAvailableis falseIsReinstallAvailableis true
Examples of possible UX:
- Show a message during upgrade discovery
- Show a message in package detail views
- Optionally distinguish this state in upgrade-listing output
PowerShell Module
Expose the new properties in projected package objects so scripts can evaluate:
$pkg.IsUpdateAvailable
$pkg.IsReinstallAvailable
$pkg.ReinstallRequiredReason
If appropriate, also surface the new state in formatting/output.
DSC Resource
Use reinstall-required metadata in detection and reporting logic so DSC can distinguish:
- package is compliant
- package can be updated in place
- package requires reinstall to reach the newer version
Potential implementation areas
DscPackageResource.cppUpdateFlow.cppPSCatalogPackage.cssrc/PowerShell/Microsoft.WinGet.Client/Format.ps1xmlMicrosoft.WinGet.DSC.psm1
Suggested rollout
- Land the COM API/core feature first
- Update PowerShell and DSC consumers next
- Add or refine CLI UX after that if separate review is preferred
Acceptance criteria
- CLI clearly communicates reinstall-required status.
- PowerShell exposes both new properties for scripting.
- DSC can distinguish updateable state from reinstall-required state.
- Tests cover at least one installer technology mismatch scenario.
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 with the dependent COM API/core work in issue 6143, then inspect DscPackageResource.cpp, UpdateFlow.cpp, PSCatalogPackage.cs, Format.ps1xml, and Microsoft.WinGet.DSC.psm1. Trace how package update state is surfaced in each client and identify existing tests for installer technology mismatches. Done means the CLI, PowerShell, and DSC surfaces distinguish reinstall-required packages and the acceptance criteria are covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, powershell
- Domain
- api, cli, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100