Repository navigation
Explain 0x80073CF9 instead of surfacing a bare HRESULT - #782
Merged
Nikola Metulev (nmetulev) merged 3 commits intoAug 25, 2026
Merged
Nikola Metulev (nmetulev) merged 3 commits into
Nikola Metulev (nmetulev) merged 3 commits into
Conversation
Copilot started reviewing on behalf of
Alexandre Zollinger Chohfi (azchohfi)
August 25, 2026 03:43
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds actionable diagnostics for package registration failure 0x80073CF9.
Changes:
- Adds MAX_PATH remediation guidance.
- Adds focused exception-message tests.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
PackageRegistrationService.cs |
Maps the HRESULT to troubleshooting guidance. |
PackageRegistrationServiceTests.cs |
Verifies hint inclusion and isolation. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
0x80073CF9 is ERROR_INSTALL_FAILED (winerror.h: 15609), the generic deployment failure - not ERROR_INSTALL_REGISTRATION_FAILURE, which is 0x80073CF6. Rename the constant and soften the hint from "this usually means" to "one common cause is", since pinning one root cause on a catch-all code misdiagnoses unrelated failures. BuildRegistrationException is also shared with RegisterSparseAsync (reached from winapp create-debug-identity), which has no --output-appx-directory and stages no layout. Drop the standalone "winapp run --output-appx-directory C:\Tmp\<AppName>" line and scope the flag mention inline so the advice holds on both paths. This also removes the suggestion to stage executed code under C:\, which inherits Modify for all Authenticated Users. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b2041178-057f-44a3-90bd-23881bc09332
Enabling system long-path support only relaxes our own ValidatePathLength gate. PackageManager still cannot open a >MAX_PATH payload file - which is why this service 8.3-shortens the manifest path before handing it over - so the policy change costs an admin round-trip and does not fix the stated cause. Leaves the short-staging guidance as the single, effective remediation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b2041178-057f-44a3-90bd-23881bc09332
Alexandre Zollinger Chohfi (azchohfi)
requested a balanced review from Copilot
August 25, 2026 05:44
Copilot started reviewing on behalf of
Alexandre Zollinger Chohfi (azchohfi)
August 25, 2026 05:45
View session
Nikola Metulev (nmetulev)
approved these changes
Aug 25, 2026
This was referenced Sep 24, 2026
This was referenced Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Maps
ERROR_INSTALL_REGISTRATION_FAILURE(0x80073CF9) to an actionable hint inBuildRegistrationException, following the existingERROR_INSTALL_PACKAGE_ALREADY_EXISTSprecedent:
Why
0x80073CF9arrives with no error text, so the caller sees onlyFailed to register package: Unknown error (0x80073CF9).The gap is specific:
PackageRegistrationServicealready callsLongPathHelper.ValidatePathLength(fullPath), but that validates the manifest path only. Amanifest can sit well under 260 characters while a nested payload file in
bin/x64/Debug/net10.0-windows10.0.26100.0/win-x64/...does not. Registration then fails inside theWinRT
PackageManagerwith an HRESULT nothing maps.Measured cost, from an agent's own retrospective on a run that ultimately succeeded:
On other runs the same condition was fatal and surfaced as three unrelated-looking errors —
Unknown error (0x80073CF9),Failed to reach state Staged, andManifest file not foundagainstthe staged copy — none of which name the cause.
Tests
Two, matching the file's existing style: one asserting the hint appears for
0x80073CF9, oneasserting it does not leak onto unrelated HRESULTs.