Open sungaila opened 7 months ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
This issue is several years old and it looks like Microsoft simply does not want us to put non-UWP apps in AppContainer. Otherwise they would realize that most UI apps use file open/save pickers. AppContainer? yes, sure, but no file open/save. Very strange. Honestly, they should simply document this and not make developers waste their time.
@Rybasum The documentation part is kinda confusing. There is in-depth documentation on how to put your WPF, WinForms or WinUI 3 app into an AppContainer using MSIX. Yet something fundamental like selecting files isn't possible with Win32 or WinRT APIs.
I have a simple WinUI 3 app here where the user selects a file and more information is put into a DataGrid. You'd think that it would be a perfect candidate for partial trust/AppContainer and just the filesystem capability.
@sungaila you want to see
https://github.com/microsoft/WindowsAppSDK/issues/8#issuecomment-2256000803
and https://github.com/microsoft/WindowsAppSDK/issues/219
and the win32-app-isolation repo.
Describe the bug
In WinUI 3 it is needed to do the following call to initialize a picker dialog:
It works just fine in full trust mode but fails when it is called in partial trust/inside an AppContainer (access denied exception).
This is terrible news because it means that WinUI 3 can either use the WinRT file dialogs OR run in partial trust. But NOT both at the same time.
Steps to reproduce the bug
Package.appxmanifest
such that the app runs in partial modebroadFileSystemAccess
capabilityExpected behavior
The file dialogs should open just as expected.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.5.2: 1.5.240404000
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response