Repository navigation
Fix known issues with NativeAOT #8724
Copy link
Copy link
Closed
Labels
Area: App RuntimeIssues in `libmonodroid.so`.Issues in `libmonodroid.so`.Area: App+Library BuildIssues when building Library projects or Application projects.Issues when building Library projects or Application projects.Area: NativeAOTIssues that only occur when using NativeAOT.Issues that only occur when using NativeAOT.enhancementProposed change to current functionality.Proposed change to current functionality.
Milestone
Description
Activity
- addedArea: App+Library BuildIssues when building Library projects or Application projects.Issues when building Library projects or Application projects.Area: App RuntimeIssues in `libmonodroid.so`.Issues in `libmonodroid.so`.
on Feb 15, 2024 - addedneeds-triageIssues that need to be assigned.Issues that need to be assigned.
on Feb 15, 2024 - removedneeds-triageIssues that need to be assigned.Issues that need to be assigned.
on Feb 15, 2024 - added a commit that references this issue
on Feb 23, 2024 Update
We'll probably actually suppress the warnings like:
// FIXME: https://github.com/xamarin/xamarin-android/issues/8724 // IL3050 disabled in source: if someone uses NativeAOT, they will get the warning. #pragma warning disable IL3050 var dynamic = new DynamicMethod (DynamicMethodNameCounter.GetUniqueName (), ret_type, param_types, typeof (DynamicMethodNameCounter), true); #pragma warning restore IL3050
- changed the title
[-][NativeAOT] fix places we use `[UnconditionalSuppressMessage ("AOT")]`[/-][+]Fix known issues with NativeAOT[/+]on Feb 27, 2024 - added a commit that references this issue
on Feb 29, 2024 - added a commit that references this issue
on Mar 1, 2024 - added a commit that references this issue
on Mar 13, 2024 - added a commit that references this issue
on Mar 14, 2024 - added a commit that references this issue
on Mar 20, 2024 We will need to suppress warnings from the trimmer, but rely on warnings coming from the AOT compiler (ILC):
- addedenhancementProposed change to current functionality.Proposed change to current functionality.
on Nov 1, 2024 - addedArea: NativeAOTIssues that only occur when using NativeAOT.Issues that only occur when using NativeAOT.
on May 8, 2025 - added a commit that references this issue
on Jul 16, 2026 - locked and limited conversation to collaborators
on Sep 12, 2026
Metadata
Metadata
Assignees
Labels
Area: App RuntimeIssues in `libmonodroid.so`.Issues in `libmonodroid.so`.Area: App+Library BuildIssues when building Library projects or Application projects.Issues when building Library projects or Application projects.Area: NativeAOTIssues that only occur when using NativeAOT.Issues that only occur when using NativeAOT.enhancementProposed change to current functionality.Proposed change to current functionality.
Android application type
.NET Android (net7.0-android, net8.0-android, etc.)
Affected platform version
.NET 9+
Description
Related: https://github.com/xamarin/java.interop/issues/1192
Related: dotnet/java-interop#1157
When setting
$(EnableAotAnalyzer)totrue, there are several warnings we will suppress for now. These will likely work under Mono, but will need to be fixed one day in .NET 10 or some future release that supports NativeAOT.Ignoring AOT warnings like a reasonable place to start, so we can enable the analyzer and not introduce new warnings.
Creating an issue for now, so I can link to this issue from C# code comments.
Steps to Reproduce
Build
Mono.Android.csprojwithEnableAotAnalyzer=true.Did you find any workaround?
No response
Relevant log output
No response