From 98207647789b18e20ca675bd53059f0151e9c65e Mon Sep 17 00:00:00 2001 From: "Calvin A. Allen" Date: Tue, 6 Jan 2026 10:02:07 -0500 Subject: [PATCH] fix(build): disable assembly trimming to fix release crashes 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 --- .github/workflows/release.yml | 1 - Directory.Build.props | 3 --- .../Properties/PublishProfiles/win-arm64.pubxml | 3 +-- .../Properties/PublishProfiles/win-x64.pubxml | 3 +-- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 39afe5d..91ba308 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,7 +58,6 @@ jobs: --self-contained true ` -p:PublishSingleFile=false ` -p:PublishReadyToRun=true ` - -p:PublishTrimmed=true ` -p:Platform=${{ matrix.platform }} ` --output ./artifacts/portable/${{ matrix.platform }} diff --git a/Directory.Build.props b/Directory.Build.props index 1704cac..7b831a2 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,8 +4,5 @@ enable enable true - - true - false diff --git a/src/CodingWithCalvin.VSToolbox/Properties/PublishProfiles/win-arm64.pubxml b/src/CodingWithCalvin.VSToolbox/Properties/PublishProfiles/win-arm64.pubxml index 3d93189..affe9c0 100644 --- a/src/CodingWithCalvin.VSToolbox/Properties/PublishProfiles/win-arm64.pubxml +++ b/src/CodingWithCalvin.VSToolbox/Properties/PublishProfiles/win-arm64.pubxml @@ -13,7 +13,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121. False False True - False - True + false \ No newline at end of file diff --git a/src/CodingWithCalvin.VSToolbox/Properties/PublishProfiles/win-x64.pubxml b/src/CodingWithCalvin.VSToolbox/Properties/PublishProfiles/win-x64.pubxml index eea93de..e2cbb1e 100644 --- a/src/CodingWithCalvin.VSToolbox/Properties/PublishProfiles/win-x64.pubxml +++ b/src/CodingWithCalvin.VSToolbox/Properties/PublishProfiles/win-x64.pubxml @@ -13,7 +13,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121. False False True - False - True + false \ No newline at end of file