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
{{ message }}
Repository navigation
[android] trimmer warning for System.Private.CoreLib.dll #100256
dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.android-x86\9.0.0-preview.4.24173.6\runtimes\android-x86\native\System.Private.CoreLib.dll : warning IL2104: Assembly 'System.Private.CoreLib' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries
ILLink warning IL2045: System.Runtime.CompilerServices.RuntimeFeature.IsDynamicCodeCompiled: Attribute 'System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute' is being referenced in code but the trimmer was instructed to remove all instances of this attribute. If the attribute instances are necessary make sure to either remove the trimmer attribute XML portion which removes the attribute instances, or override the removal by using the trimmer XML descriptor to keep the attribute type (which in turn keeps all of its instances).
Reproduction Steps
dotnet new android
dotnet build -c Release
Add -p:TrimmerSingleWarn=false to get a more detailed warning.
Expected behavior
No trimmer warnings.
Actual behavior
Trimmer warning about System.Private.CoreLib.dll.
Regression?
Yes
Known Workarounds
I suppose you could set -p:SuppressTrimAnalysisWarnings=true, but that is not ideal.
Activity
filipnavara commentedon Mar 25, 2024
Introduced by #99641. /cc @sbomer
jonathanpeppers commentedon Mar 27, 2024
This is happening here (.NET 9 Preview 3) as well: dotnet/android#8838
FIXME: dotnet/runtime#100256
FIXME: dotnet/runtime#100256
FIXME: dotnet/runtime#100256
FIXME: dotnet/runtime#100256
Bump to dotnet/installer@09d6f381e6 9.0.100-preview.3.24175.24 (#8838)
Bump to dotnet/installer@dc43d363d2 9.0.100-preview.4.24175.5 (#8828)
Allow trimming FeatureGuard and FeatureSwitchDefinition attributes (#…
[tests] we can assert 0 trimmer warnings again
Bump to dotnet/installer@0bfd2dd757 9.0.100-preview.4.24208.2 (#8862)
Allow trimming FeatureGuard and FeatureSwitchDefinition attributes (d…
Allow trimming FeatureGuard and FeatureSwitchDefinition attributes (d…