microsoft / microsoft/WinUI-Gallery

StorageApplicationPermissions throws exception in unpackaged app build

Open
#1,371 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
3.6k
Forks
756
Avg merge
17h 51m
Merged PRs (30d)
14

Description

Which version of the app?

WinUI 3 Gallery

Description

In the FilePickerPage.cs there is the async void PickFolderButton_Click(object sender, RoutedEventArgs e) method:

[Line 187]
StorageApplicationPermissions.FutureAccessList.AddOrReplace("PickedFolderToken", folder);

If compiling as an unpackage application, this line throws an ArgumentException (see screenshot).

Screenshots

image

Windows version

Windows 10 22H2 (19045)

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in FilePickerPage.cs at the async void PickFolderButton_Click method and reproduce the failure on an unpackaged WinUI 3 Gallery build. Inspect the AddOrReplace call at line 187 and verify the folder-picking flow completes without an ArgumentException in unpackaged builds while remaining functional for packaged builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.