Closed 4OTbIPE closed 2 months ago
Is the app packaged?
Is the app packaged?
yea
Is there any detail on the COMException that you got such as the HRESULT / error code?
Is there any detail on the COMException that you got such as the HRESULT / error code?
I executed this line of code in a clean, newly created WinUI3 application.
await (await StorageLibrary.GetLibraryAsync(KnownLibraryId.Pictures)).RequestAddFolderAsync();
And I got this exception. Exception's message is empty.
в WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|39_0(Int32 hr)
в WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr)
в ABI.Windows.Storage.IStorageLibraryMethods.RequestAddFolderAsync(IObjectReference _obj)
в Windows.Storage.StorageLibrary.RequestAddFolderAsync()
в App2.MainWindow.<myButton_Click>d__1.MoveNext() в C:\Users\alexe\source\repos\App2\App2\App2\MainWindow.xaml.cs:строка 33
You also can try execute that line of code in clear WinUI3 app. The runFullTrust app. I tried adding Pictures Library to the app's capabilities, but it didn't help. There is a similar problem with RequestRemoveFolderAsync()
Any news on this please? Can I wait for the fix in the new version with AOT? 2.1 i assume
@manodasanW any new on this bug, please?
I took a look at this. This looks to be an issue with the API itself running on desktop apps. You can find more details and a potential workaround here: https://github.com/microsoft/WindowsAppSDK/issues/4590#issuecomment-2241577125.
Describe the bug System.Runtime.InteropServices.COMException in storageLibrary.RequestAddFolderAsync() or storageLibrary.RequestRemoveFolderAsync()
To Reproduce
Expected behavior As in the UWP application, an explorer window appears with a folder selection
Version Info WinSDK 10.0.22621 WinAppSDK 1.4.4 Windows 10 Version 21H2 CsWinRT 2.0.7