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
Multiple IL2037 warnings when publishing Maui app with PublishAot=true #26969
Multiple IL2037 warnings occur when publishing a .NET Maui app with PublishAot set to true. I am using .NET 10.0.402 with iOS workload version 27.1.10018 and Xcode 27.1. I noticed the warnings when building my app and reproduced with a new Maui app.
`ILLink : warning IL2037: ..cctor(): No members were resolved for 'Microsoft.Maui.Platform.IUIViewLifeCycleEvents.MovedToWindow' on type 'Microsoft.Maui.Platform.MauiSearchBar'.
ILLink : warning IL2037: ..cctor(): No members were resolved for 'Microsoft.Maui.IPlatformApplication.Application' on type 'Microsoft.Maui.MauiUIApplicationDelegate'.
ILLink : warning IL2037: ..cctor(): No members were resolved for 'Microsoft.Maui.Platform.IUIViewLifeCycleEvents.MovedToWindow' on type 'Microsoft.Maui.Platform.MauiActivityIndicator'.
ILLink : warning IL2037: ..cctor(): No members were resolved for 'Microsoft.Maui.ICrossPlatformLayoutBacking.CrossPlatformLayout' on type 'Microsoft.Maui.Platform.MauiScrollView'.
ILLink : warning IL2037: ..cctor(): No members were resolved for 'Microsoft.Maui.Platform.IUIViewLifeCycleEvents.MovedToWindow' on type 'Microsoft.Maui.Platform.MauiPageControl'.
Thanks for the report!
We're already fixed this, but the fix wasn't backported to the release branch. We'll do that, and this will be fixed in the next .NET 10 release.
Thanks for the quick reply. Are these real warnings that could problems or just false positives?
Thanks for the report!
We're already fixed this, but the fix wasn't backported to the release branch. We'll do that, and this will be fixed in the next .NET 10 release.
Thanks for the quick reply. Are these real warnings that could problems or just false positives?
Possibly. The problem is that build might end up trimming away some properties and events that shouldn't be trimmed away.
However, since this is limited to properties and events that implement interface members explicitly (not methods, nor any member for any other reason) + this would only cause problems if no other code already references these members (because then they wouldn't be trimmed away anyway), I would think it's unlikely there will be problems. That said, it's not impossible, so please test the NativeAOT build to make sure it continues to work.
Activity
rolfbjarne commentedon Oct 22, 2026
Thanks for the report!
We're already fixed this, but the fix wasn't backported to the release branch. We'll do that, and this will be fixed in the next .NET 10 release.
mjo151 commentedon Oct 22, 2026
Thanks for the quick reply. Are these real warnings that could problems or just false positives?
rolfbjarne commentedon Oct 22, 2026
Possibly. The problem is that build might end up trimming away some properties and events that shouldn't be trimmed away.
However, since this is limited to properties and events that implement interface members explicitly (not methods, nor any member for any other reason) + this would only cause problems if no other code already references these members (because then they wouldn't be trimmed away anyway), I would think it's unlikely there will be problems. That said, it's not impossible, so please test the NativeAOT build to make sure it continues to work.
Move to the .NET 10.0.403 / Xcode 27.1 toolchain
Move to the .NET 10.0.403 / Xcode 27.1 toolchain (#161)
Require a base state on host reconciliations (#160)
charlesroddie commentedon Nov 11, 2026
The fix isn't in the dotnet11 release. Hopefully the next one!
rolfbjarne commentedon Nov 11, 2026
@charlesroddie
As far as I can tell it is in the .NET 11 release.
I'm wondering whether you're running into a separate issue somehow; could you get an MSBuild binlog for a build that shows these warnings?
charlesroddie commentedon Nov 11, 2026
Ah you are right, sorry. Getting a similar but different problem and opening a new issue for it.
rolfbjarne commentedon Nov 11, 2026
Ok, I'll close this issue then since it's fixed.