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
That broke the entire app because of the Reflection used 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/il2104 Assembly 'WinRT.Runtime' produced trim warnings. For more information see https://aka.ms/il2104
Since 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.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
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
Reflection
used 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/il2104
Assembly 'WinRT.Runtime' produced trim warnings. For more information see https://aka.ms/il2104
Since 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.
Beta Was this translation helpful? Give feedback.
All reactions