Skip to content

Conversation

@CalvinAllen
Copy link
Contributor

Summary

  • Disable assembly trimming in release workflow and publish profiles
  • Remove unnecessary trim warning suppression from Directory.Build.props

Root Cause

WinUI 3 applications crash when assembly trimming is enabled because XAML deserialization relies on dynamic type instantiation and metadata that gets stripped by the trimmer. This caused STATUS_STOWED_EXCEPTION (0xc000027b) crashes in Microsoft.UI.Xaml.dll when running the portable release build.

The application worked via dotnet run because trimming is only applied during publish.

Test Plan

  • Build in Release configuration locally
  • Run portable build and verify application starts without crashing
  • Verify system tray icon appears and context menu works

Fixes #35

WinUI 3 applications crash when assembly trimming is enabled because
XAML deserialization relies on dynamic type instantiation and metadata
that gets stripped by the trimmer. This caused STATUS_STOWED_EXCEPTION
(0xc000027b) crashes in Microsoft.UI.Xaml.dll when running the portable
release build.

Changes:
- Remove PublishTrimmed from release workflow
- Set PublishTrimmed=false in publish profiles
- Remove unnecessary trim warning suppression settings

Fixes #35
@CalvinAllen CalvinAllen merged commit 1fca91e into main Jan 6, 2026
6 checks passed
@CalvinAllen CalvinAllen deleted the fix/build/disable-trimming branch January 6, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Unable to Run Release version

2 participants