-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] FolderPicker throws ComException on Standalone Non-MSIX app #2470
Comments
We do not support dotnet 8.x. We currenlty only support dotnet 9.x with current release of Community toolkit. Please update to dotnet 9.x If you still have issues with this after updating please create a new issue. RequirementsThe following tools are now required for CommunityToolkit.Maui.:
global.json
|
Please re-examine. |
I looked at the sample app. It does crash when compiling. If you look at the error it says the version of WindowsAppSdk is not compatible. Try updating that. I just created an app with sample code from you main page copy pasted and I was able to run it unpackaged as x64. You should not need to manually set up or adjust the windows app sdk. The minimum supported package version for the sdk is 1.6.x last time I checked. the 1.5 version you specified will not work the community toolkit. |
The app does not crash on compile for me? The app runs, but when you attempt to pick a folder it never shows the folder picker UI and outputs the error to console. The build and run was working friday but now I have to right click the project and hit build first. Then can hit run. I did not specify the WinAppSDK version? I just tried specifying the latest 1.6.250108002 and the error is still present?
|
From what I understand your client is locked to dotnet 8? We do not support dotnet 8.x at all with the release of dotnet 9 support. We are all volunteers who have limited time and we offer support only for current version of dotnet maui which is using dotnet 9.x. This issue is reported as being an issue for dotnet 9.x too so this report will stay open. We do not plan to backport a fix for older versions of dotnet. If there are any workarounds please continue to use them. |
Yes we plan to upgrade to Net 9 later this year but are unable to at the moment. Its just really odd it only happens when launched from VS, when published or even run from the bin folder manually it works. |
I have created a sample repo for those using dotnet 9.x with an example of how to use folder picker: For more information on how to configure your app on how to use There are a number of steps you need to take including editing device specific settings in the platform folder for each device type. |
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
!!! Change Platform to x64 and Target to Self-Contained !!!
When running app with launchSetting command name Project, so a unpackaged standalone non-msix app. App runs fine but when attempting to show a folder picker you get a COMException.
Also in log see the following error:
mincore\com\oleaut32\dispatch\ups.cpp(2122)\OLEAUT32.dll!00007FFAD02AA726: (caller: 00007FFAD02A9B39) ReturnHr(1) tid(1bc24) 8002801D Library not registered.
However, if you publish the MAUI app all works as expected.
dotnet publish .\MauiFolderPickerBroken\MauiFolderPickerBroken.csproj -f:net9.0-windows10.0.19041.0 -p:TargetFrameworks=net9.0-windows10.0.19041.0 -p:Version=99.9.9.9 -p:Platform=x64 -c:Debug --output C:\a\folderpicker9\ -p:WindowsPackageType=None --self-contained
Tried Release vs Debug, no difference.
Net8 vs Net9, no difference.
MauiVersion 8.0.100 vs 8.0.3, no difference. Believe it used to work on 8.0.3 but maybe due to workload updates it no longer does.
Also Tried CommunityToolkit V11 and V10 and issue persists.
Left the example at MauiVersion 8.0.100 as thats what my app is currently locked at due to client support obligations, which is also the reason we have to build as standalone exe, not MSIX as windows store is disabled on client devices.
Running as normal "Windows Machine" MSIX and folder picker works fine.
Not sure if this is a maui, communitytoolkit, or winappruntime/winappsdk bug.
Expected Behavior
Folder picker to open and allow you to pick a folder and return successful result.
Steps To Reproduce
Link to public reproduction project repository
https://github.com/Captnwalker1/MauiFolderPickerBroken
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: