Description
The PublishNativeAOTRootAllMauiAssemblies and PublishNativeAOT integration tests fail on Android (net11.0-android) because the expected warnings baseline doesn't include new IL3050 warnings from HybridWebViewHandler.
Error
Unexpected warning messages detected for the expected warnings file path 'ILC' and warning code 'IL3050'!
Unexpected warning messages are:
Microsoft.Maui.Controls.Hosting.AppHostBuilderExtensions.AddControlsHandlers(IMauiHandlersCollection):
Using member 'Microsoft.Maui.Handlers.HybridWebViewHandler.HybridWebViewHandler()' which has
'RequiresDynamicCodeAttribute' can break functionality when AOT compiling.
HybridWebView uses dynamic System.Text.Json serialization features.
Microsoft.Maui.Controls.Hosting.AppHostBuilderExtensions.AddControlsHandlers(IMauiHandlersCollection):
Using member 'Microsoft.Maui.Handlers.HybridWebViewHandler.HybridWebViewHandler(IPropertyMapper,CommandMapper)'
which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling.
HybridWebView uses dynamic System.Text.Json serialization features.
Affected Tests
AOTTemplateTest.PublishNativeAOTRootAllMauiAssemblies (android-x64, android-arm64)
AOTTemplateTest.PublishNativeAOT (android-x64, android-arm64)
Fails on both Windows and macOS AOT integration test jobs.
Repro
Observed on release/11.0.1xx-preview3 and net11.0 branches with Android SDK 36.99.0-preview.3.10.
Expected Fix
Update the expected warnings baseline in the AOT integration tests to include these IL3050 warnings for HybridWebViewHandler, or suppress the warning on the HybridWebViewHandler constructors.
Description
The
PublishNativeAOTRootAllMauiAssembliesandPublishNativeAOTintegration tests fail on Android (net11.0-android) because the expected warnings baseline doesn't include newIL3050warnings fromHybridWebViewHandler.Error
Affected Tests
AOTTemplateTest.PublishNativeAOTRootAllMauiAssemblies(android-x64, android-arm64)AOTTemplateTest.PublishNativeAOT(android-x64, android-arm64)Fails on both Windows and macOS AOT integration test jobs.
Repro
Observed on
release/11.0.1xx-preview3andnet11.0branches with Android SDK36.99.0-preview.3.10.Expected Fix
Update the expected warnings baseline in the AOT integration tests to include these
IL3050warnings forHybridWebViewHandler, or suppress the warning on theHybridWebViewHandlerconstructors.