Skip to content

Document the package resource index (PRI) file format - #6105

Draft
John Kennedy (GrantMeStrength) with Copilot wants to merge 2 commits into
docsfrom
copilot/add-information-about-pri-file-format
Draft

Document the package resource index (PRI) file format#6105
John Kennedy (GrantMeStrength) with Copilot wants to merge 2 commits into
docsfrom
copilot/add-information-about-pri-file-format

Conversation

Copilot AI commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

The PRI file format was undocumented — existing content covers the tools that produce PRI files (MakePri.exe, the PRI APIs) but never describes what a PRI file actually contains. This adds an article covering the logical structure and how to inspect one.

New article: uwp/app-resources/pri-file-format.md

  • Provenance and placement — build-time generation, resources.pri at the package root, additional PRI files per resource package, and why the format is data-only rather than PE.
  • Logical structure — resource map → qualifier set → resource map subtrees → named resources → candidates, illustrated with a makepri dump XML sample and a table mapping each element to its run-time projection (ResourceMap, NamedResource, ResourceCandidate).
  • Candidate value kinds — string, path, and embedded data, tied to the emitStrings / emitPaths / emitEmbeddedData attributes of the priinfo indexer.
  • Optional parts — the schema (including schema-free resource packs and /SchemaFile(sf)), and the debugging-only reverse map from /ReverseMap(rm).
  • Inspectionmakepri dump with the four dump types plus /oo and /es, MrmDumpPriFile, and run-time enumeration via ResourceManager or MRT Core.

Scope of what is claimed

The byte-level layout is deliberately not described. Rather than reverse-engineering or inventing a specification, an [!IMPORTANT] note states plainly that the binary layout is undocumented, is not a stable contract, may change across Windows/SDK versions, and that code should not parse PRI bytes directly. Everything documented is the logical structure that supported tools and APIs already expose, sourced from existing repo content (MakePri options/config/indexers, PRI APIs scenario 1, Resource Management System) — no new property, API, or version names are introduced.

Discoverability

  • Added to the app resources index table and to uwp/develop/toc.yml, positioned before the MakePri.exe entries.
  • Cross-linked from Resource Management System (both the PRI bullet list and related topics) and from the MakePri.exe related topics.

Reviewers may want to weigh in on whether Summary dump type is described accurately — makepri dump /? does not define it, so the description is inferred from the observed output summary format and is the one claim worth a second look.

Co-authored-by: GrantMeStrength <1928855+GrantMeStrength@users.noreply.github.com>
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 0763d1a:

⚠️ Validation status: warnings

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

Copilot AI changed the title [WIP] Add documentation for the PRI file format Document the package resource index (PRI) file format Aug 31, 2026
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 3e61fec:

💡 Validation status: suggestions

File Status Preview URL Details
uwp/app-resources/pri-file-format.md 💡Suggestion Details
uwp/app-resources/compile-resources-manually-with-makepri.md ✅Succeeded
uwp/app-resources/index.md ✅Succeeded
uwp/app-resources/resource-management-system.md ✅Succeeded
uwp/develop/toc.yml ✅Succeeded

uwp/app-resources/pri-file-format.md

  • Line 0, Column 0: [Suggestion: filename-incomplete - See documentation] The filename contains an incomplete word, misspelled word, acronym, or abbreviation that is disallowed.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@prmerger-automator

Copy link
Copy Markdown
Contributor

PRMerger Results

Issue Description
Added File(s) This PR contains added files. New files require human review.
Yaml File(s) This PR includes changes to .yml file(s) owned by another author.
File Change Percent This PR contains file(s) with more than 30% file change.
Index File This PR contains a change to the index file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add information about the PRI file format

2 participants