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
Create a new project from the "Blank App, Packaged (WinUI 3 in Desktop)" template and add
* CsWinRT `2.1.1`
* WindowsSdkPackageVersion `10.0.22621.38` (matching `TargetFramework`)
* SettingsControls 8.1.240821
(ensure WASDK is at version `1.6.240829007`, this was already the case for me)
Then,
1. Add `<controls:SettingsExpander />` to `MainWindow.xaml`
2. Start the project in release mode (the template included publish profile enables `PublishedTrimmed` for release builds)
3. Crash on startup
Expected behavior
There are no trim warnings, app does not crash on startup.
Screenshots
No response
Code Platform
UWP
WinAppSDK / WinUI 3
Web Assembly (WASM)
Android
iOS
MacOS
Linux / GTK
Windows Build Number
Windows 10 1809 (Build 17763)
Windows 10 1903 (Build 18362)
Windows 10 1909 (Build 18363)
Windows 10 2004 (Build 19041)
Windows 10 20H2 (Build 19042)
Windows 10 21H1 (Build 19043)
Windows 10 21H2 (Build 19044)
Windows 10 22H2 (Build 19045)
Windows 11 21H2 (Build 22000)
Other (specify)
Other Windows Build number
Windows 11 23H2
App minimum and target SDK version
Windows 10, version 1809 (Build 17763)
Windows 10, version 1903 (Build 18362)
Windows 10, version 1909 (Build 18363)
Windows 10, version 2004 (Build 19041)
Windows 10, version 2104 (Build 20348)
Windows 11, version 22H2 (Build 22000)
Other (specify)
Other SDK version
No response
Visual Studio Version
2022
Visual Studio Build Number
17.11.35222.181
Device form factor
Desktop
Additional context
Discovered this issue when trying to enable NativeAOT for my project, which seems to be blocked by this issue.
Although I'm unable to reproduce the behaviour in my MRE, my original project is able to render the expander, but throws the following exception when expanding it:
System.ExecutionEngineException
HResult=0x80131506
This exception was originally thrown at this call stack:
WinRT.ExceptionHelpers.ThrowExceptionForHR.__Throw|38_0(int)
ABI.Microsoft.UI.Xaml.Controls.IStyleSelectorMethods.SelectStyle(WinRT.IObjectReference, object, Microsoft.UI.Xaml.DependencyObject)
CommunityToolkit.WinUI.Controls.SettingsExpander.ItemsRepeater_ElementPrepared(Microsoft.UI.Xaml.Controls.ItemsRepeater, Microsoft.UI.Xaml.Controls.ItemsRepeaterElementPreparedEventArgs) in SettingsExpander.ItemsControl.cs
ABI.Windows.Foundation.TypedEventHandlerMethods<TSender, TSenderAbi, TResult, TResultAbi>.Abi_Invoke(System.IntPtr, TSender, TResult)
WinRT.GenericTypeInstantiations.Windows_Foundation_TypedEventHandler_2_Microsoft_UI_Xaml_Controls_ItemsRepeater__Microsoft_UI_Xaml_Controls_ItemsRepeaterElementPreparedEventArgs.Do_Abi_Invoke(System.IntPtr, System.IntPtr, System.IntPtr)
Inner Exception 1:
InvalidCastException: Specified cast is not valid.
Help us help you
Yes, but only if others can assist.
The text was updated successfully, but these errors were encountered:
Describe the bug
The app crashes during initialization.
Running under WinDbg reveales that the stowed exception is
0x80040154
(REGDB_E_CLASSNOTREG
) with the following stack trace:Steps to reproduce
Expected behavior
There are no trim warnings, app does not crash on startup.
Screenshots
No response
Code Platform
Windows Build Number
Other Windows Build number
Windows 11 23H2
App minimum and target SDK version
Other SDK version
No response
Visual Studio Version
2022
Visual Studio Build Number
17.11.35222.181
Device form factor
Desktop
Additional context
Discovered this issue when trying to enable NativeAOT for my project, which seems to be blocked by this issue.
Although I'm unable to reproduce the behaviour in my MRE, my original project is able to render the expander, but throws the following exception when expanding it:
Help us help you
Yes, but only if others can assist.
The text was updated successfully, but these errors were encountered: