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
We are trying to use <PublishTrimmed>True</PublishTrimmed> in our application publish profiles but are encountering a crash when using Styles coming from our external Material library of XAML styles.
The error we see in the logs is:
Exception thrown at 0x00007FFB487A535C (KernelBase.dll) in MaterialTestApp.Windows.exe: WinRT originate error - 0x802B000A : 'Failed to assign to property 'Microsoft.UI.Xaml.UIElement.Visibility'. [Line: 0 Position: 0]'.
And it seems to be happening with any style that is using converters defined in our Material library
It's not only isolated to Visibility, all converters are simply not being applied. And this is crashing only when running as a Packaged app. Running as Unpackaged does not lead to a crash and the converters are working
Removing the PublishTrimmed from the .pubxmls avoids the crash on Packaged apps
Interestingly, just adding a class that inherits from IValueConverter anywhere in my sample app will workaround the crash. I don't even need to use the converter in the XAML, just having it in the project will avoid the crash
The text was updated successfully, but these errors were encountered:
Describe the bug
We are trying to use
<PublishTrimmed>True</PublishTrimmed>
in our application publish profiles but are encountering a crash when using Styles coming from our external Material library of XAML styles.The error we see in the logs is:
And it seems to be happening with any style that is using converters defined in our Material library
It's not only isolated to Visibility, all converters are simply not being applied. And this is crashing only when running as a Packaged app. Running as Unpackaged does not lead to a crash and the converters are working
Removing the
PublishTrimmed
from the .pubxmls avoids the crash on Packaged appsSteps to reproduce the bug
CrashingWinSample.zip
Expected behavior
No crash
Screenshots
No response
NuGet package version
Windows App SDK 1.4.2: 1.4.231008000
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022-preview, Visual Studio 2022
Additional context
Interestingly, just adding a class that inherits from
IValueConverter
anywhere in my sample app will workaround the crash. I don't even need to use the converter in the XAML, just having it in the project will avoid the crashThe text was updated successfully, but these errors were encountered: