Trimming for WinUI3 #10784
Trimming for WinUI3
#10784
Replies: 1 comment 3 replies
|
You should set it to False, it may sometimes trim too much |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I've been working on a WinUI3 app and I noticed that PublishTrimmed is enabled for Release.
That broke the entire app because of the
Reflectionused in Dapper and the System.Text.Json.JsonSerializer. I have more than 30 IL warnings in my project, but there are two warnings that caught my attention:Assembly 'Microsoft.Windows.SDK.NET' produced trim warnings. For more information see https://aka.ms/il2104Assembly 'WinRT.Runtime' produced trim warnings. For more information see https://aka.ms/il2104Since those assemblies are part of WinUI3 and there's no guarantee that the app works because of trimming, should I disable trimming for the app? If so, why is trimming enabled for Release?
I think I could address the IL warnings for Dapper by using a different approach and use source generation for JsonSerializer but the warnings for the SDK will remain and so the app could (or could not) fail. At this point, I think it is not worth to keep the trimming configuration unless I am missing something.
All reactions