You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FolderPicker Not working in 1.8-preview with SelfContained: Element not found. #5749
I'm not actually seeing this when using the pickers from a C++ Windows API application.
I am seeing noisy debug output along the lines of:
onecoreuap\internal\shell\inc\SrcPkg\FileExplorerSessionWatcher\inc\FileExplorerSessionWatcher.h(1819)\SHELL32.dll!00007FF95AACF5D8: (caller: 00007FF95A9DA9F2) ReturnHr(1) tid(3790) 80004001 Not implemented
shell\SrcPkg\FileExplorer\DefView\src\DefView.cpp(17814)\SHELL32.dll!00007FF95A9DAA11: (caller: 00007FF92D842F4F) LogHr(1) tid(3790) 80004001 Not implemented
'WinTest.exe' (Win32): Loaded 'C:\Windows\System32\urlmon.dll'. Symbols loaded without source information.
'WinTest.exe' (Win32): Loaded 'C:\Windows\System32\iertutil.dll'. Symbols loaded without source information.
'WinTest.exe' (Win32): Loaded 'C:\Windows\System32\Windows.System.Launcher.dll'. Symbols loaded without source information.
'WinTest.exe' (Win32): Loaded 'C:\Windows\System32\IconCodecService.dll'. Symbols loaded without source information.
'WinTest.exe' (Win32): Loaded 'C:\Windows\System32\policymanager.dll'. Symbols loaded without source information.
'WinTest.exe' (Win32): Loaded 'C:\Windows\System32\msvcp110_win.dll'. Symbols loaded without source information.
onecoreuap\internal\shell\inc\SrcPkg\FileExplorerSessionWatcher\inc\FileExplorerSessionWatcher.h(1819)\SHELL32.dll!00007FF95AACF5D8: (caller: 00007FF95A9DA9F2) ReturnHr(2) tid(3790) 80004001 Not implemented
shell\SrcPkg\FileExplorer\DefView\src\DefView.cpp(17814)\SHELL32.dll!00007FF95A9DAA11: (caller: 00007FF92D842F4F) LogHr(2) tid(3790) 80004001 Not implemented
'WinTest.exe' (Win32): Loaded 'C:\Windows\System32\d2d1.dll'. Symbols loaded without source information.
'WinTest.exe' (Win32): Loaded 'C:\Windows\System32\d3d11.dll'. Symbols loaded without source information.
'WinTest.exe' (Win32): Loaded 'C:\Windows\System32\dxgi.dll'. Symbols loaded without source information.
'WinTest.exe' (Win32): Loaded 'C:\Windows\System32\d3d10warp.dll'. Symbols loaded without source information.
'WinTest.exe' (Win32): Loaded 'C:\Windows\System32\DXCore.dll'. Symbols loaded without source information.
'WinTest.exe' (Win32): Loaded 'C:\Windows\System32\ResourcePolicyClient.dll'. Symbols loaded without source information.
'WinTest.exe' (Win32): Unloaded 'C:\Windows\System32\ResourcePolicyClient.dll'
'WinTest.exe' (Win32): Loaded 'C:\Windows\System32\directxdatabasehelper.dll'. Symbols loaded without source information.
'WinTest.exe' (Win32): Unloaded 'C:\Windows\System32\d3d10warp.dll'
'WinTest.exe' (Win32): Unloaded 'C:\Windows\System32\msftedit.dll'
shell\explorerframe\navbar.cpp(82)\explorerframe.dll!00007FF92D93AE15: (caller: 00007FF92D827A3E) LogHr(1) tid(3790) 80070057 The parameter is incorrect.
The thread 30340 has exited with code 0 (0x0).
C:\__w\1\s\packages\Microsoft.Windows.ImplementationLibrary.1.0.240803.1\include\wil\result.h(958)\Microsoft.WindowsAppRuntime.dll!00007FF8481CB30C: (caller: 00007FF8481FD7FD) LogHr(1) tid(6ecc) 8007029C An assertion failure has occurred.
But otherwise the pickers are seemingly working correctly. This is framework dependent and I have tested both packaged and unpackaged.
The code that I am using to use the folder picker is:
void main_window::on_lbuttonup(window_base::windowing::mouse_vkey, int32_t, int32_t)
{
[](winrt::Microsoft::UI::WindowId id) -> winrt::Windows::Foundation::IAsyncAction
{
winrt::Microsoft::Windows::Storage::Pickers::FolderPicker fp{ id };
auto result = co_await fp.PickSingleFolderAsync();
co_return;
}(winrt::Microsoft::UI::GetWindowIdFromWindow(get_handle()));
}
So, does this also happen in a WPF/WinForms application? Is your application self contained? Are you attempting to apply the workaround for experimental?
Does your StackTrace by chance include something about Microsoft.Windows.ApplicationModel.Resources? I get the Element Not Found COM Exception too but it's because somehow my .resw files aren't imported into the project.
changed the title [-]FolderPicker Not working in 1.8-preview Element not found.[/-][+]FolderPicker Not working in 1.8-preview with SelfContained: Element not found.[/+]on Aug 24, 2025
Well, if the project is set to self contained and is using the project that has the integrated packaging stuff, then this happens. If the project is an external packaging project then everything seems to work fine, even when EnableMsixTooling is set to true.
Final edit.
After looking through the directory, I noticed that there was a discrepancy in the files in the directory between the single project packaging project and the external packaging project. After looking through and copying some files over that really mattered, (no .xbf files since the single project packaging embeds these even in the debug configuration) it worked. So the single project packaging is missing files that the external packaging project is copying. I haven't put too much effort into figuring out which file is the real problem, but it is the single project packaging that is the cause of this.
DarranRowe i could not find Microsoft.WindowsAppRuntime.pri, and my project is a Single MSIX Project, however i tested project in UnPackaged mode and it is worked fine!
If the absence of that file is causing a problem, then this would be unexpected in its own right. The resources in Microsoft.WindowsAppRuntime.pri are being merged into the package's resources.pri. It is expected that the resources should be found in there.
Activity
DarranRowe commentedon Aug 24, 2025
I'm not actually seeing this when using the pickers from a C++ Windows API application.
I am seeing noisy debug output along the lines of:
But otherwise the pickers are seemingly working correctly. This is framework dependent and I have tested both packaged and unpackaged.
The code that I am using to use the folder picker is:
So, does this also happen in a WPF/WinForms application? Is your application self contained? Are you attempting to apply the workaround for experimental?
Sella-GH commentedon Aug 24, 2025
Does your StackTrace by chance include something about
Microsoft.Windows.ApplicationModel.Resources? I get the Element Not Found COM Exception too but it's because somehow my .resw files aren't imported into the project.ghost1372 commentedon Aug 24, 2025
Thank you DarranRowe
The issue originates from this line.
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>can you tell me about workaround?
[-]FolderPicker Not working in 1.8-preview Element not found.[/-][+]FolderPicker Not working in 1.8-preview with SelfContained: Element not found.[/+]DarranRowe commentedon Aug 24, 2025
Mahdi Hosseini (@ghost1372)
The one documented in the experimental 4 release notes.
Well, if the project is set to self contained and is using the project that has the integrated packaging stuff, then this happens. If the project is an external packaging project then everything seems to work fine, even when
EnableMsixToolingis set to true.Final edit.
After looking through the directory, I noticed that there was a discrepancy in the files in the directory between the single project packaging project and the external packaging project. After looking through and copying some files over that really mattered, (no .xbf files since the single project packaging embeds these even in the debug configuration) it worked. So the single project packaging is missing files that the external packaging project is copying. I haven't put too much effort into figuring out which file is the real problem, but it is the single project packaging that is the cause of this.
ghost1372 commentedon Aug 25, 2025
DarranRowe i could not find
Microsoft.WindowsAppRuntime.pri, and my project is a Single MSIX Project, however i tested project in UnPackaged mode and it is worked fine!optsing commentedon Aug 25, 2025
DarranRowe wait, there is a known issue in experemental4 that dialogs don't work in non-self-contained, but now they don't work in self-contained.
DarranRowe commentedon Aug 25, 2025
optsing
They work with self contained without issue if the project is unpackaged or it is packaged and you are using the separate packaging project.
Mahdi Hosseini (@ghost1372)
If the absence of that file is causing a problem, then this would be unexpected in its own right. The resources in
Microsoft.WindowsAppRuntime.priare being merged into the package'sresources.pri. It is expected that the resources should be found in there.DinahK-2SO commentedon Aug 27, 2025
Thanks Mahdi Hosseini (@ghost1372) for reporting this issue. It is caused by the missing *.pri files - they were not included in the App package.
We also discovered and reported this issue internally, tagging Scott Jones (@Scottj1s) and Manodasan Wignarajah (@manodasanW) here.
manodasanW commentedon Aug 30, 2025
This should be resolved with Microsoft.Windows.SDK.BuildTools.MSIX 1.7.20250829.1. WinAppSDK will be updated to reference that but you can try referencing it directly to confirm if it resolves your issue.
manodasanW commentedon Sep 9, 2025
This is fixed in WinAppSDK 1.8.