Skip to content

Correct the fileName parmeter description for WASDK ResourceLoader(String fileName) constructor#122

Open
lauren-ciha wants to merge 3 commits into
MicrosoftDocs:docsfrom
lauren-ciha:user/laurenciha/update-wasdk-resource-loader-string-description
Open

Correct the fileName parmeter description for WASDK ResourceLoader(String fileName) constructor#122
lauren-ciha wants to merge 3 commits into
MicrosoftDocs:docsfrom
lauren-ciha:user/laurenciha/update-wasdk-resource-loader-string-description

Conversation

@lauren-ciha

Copy link
Copy Markdown
Contributor

This PR updates the description for the fileName parameter required for Windows App SDK's ResourceLoader.String() constructor. The fileName parameter takes in the path to a .pri file, not a resourceMap. The description added matches the description for the same parameter in ResourceLoader(String, String), which was introduced at the same time as the one-parameter constructor.

See Windows App SDK Issue #2406 - ResourceLoader can not load the specified resource.

@lauren-ciha

Copy link
Copy Markdown
Contributor Author

Looping in @huichen123

@GrantMeStrength GrantMeStrength left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The ResourceLoader(String) constructor has two distinct use cases that this PR collapses into one. The original documentation ("resource identifier treated as a URI fragment") described the common case: passing a simple name like "Errors" to access a ResourceMap by name, which looks up resources relative to errors.resw or errors.resjson. The new text only describes loading by PRI file path, which is the less common case. A developer who writes new ResourceLoader("Errors") will be confused if the docs only mention PRI file paths. Please retain the resource-map-identifier explanation as the primary case, and add the PRI file path as a secondary note if applicable.

@GrantMeStrength

Copy link
Copy Markdown
Collaborator

@copilot /review

@GrantMeStrength GrantMeStrength left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review: Needs Verification

This PR changes the ResourceLoader constructor description from loading a "resource map" to loading a "PRI file."

ResourceLoader doesn't directly load PRI files by path — it accesses named resource maps within the app's resource infrastructure. The parameter is a resource map identifier (e.g., "Errors" maps to resources in errors.resw), not a file system path to a .pri file.

Please verify this semantic change is accurate before merging.

@GrantMeStrength GrantMeStrength self-assigned this Jul 17, 2026
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.

2 participants