Skip to content

[Mono] GenerateJavaCallableWrappers looks for JLO beside packaged MAUI resource assembly #12487

Description

@matouskozak

Description

Publishing a packaged .NET MAUI app with Mono fails in GenerateJavaCallableWrappers because it looks for a .jlo.xml file beside a resource assembly inside Microsoft.Maui.Controls.Core.nupkg:

Microsoft.Android.Sdk.TypeMap.LlvmIr.targets(55,5): error:
'Microsoft.Maui.Controls.Core/11.0.0-preview.7.26418.6/lib/net11.0-android37.0/ar/Microsoft.Maui.Controls.resources.jlo.xml' not found.

The package contains:

lib/net11.0-android37.0/ar/Microsoft.Maui.Controls.resources.dll

but no adjacent .jlo.xml file.

Regression evidence

The MAUI package was produced from dotnet/maui@ee4d06c.

The failing performance jobs use Android SDK 37.0.0-rc.2.2294, produced from dotnet/android@2aceefd.

The relevant JLO-path change between those SDK revisions is f96cd7f / #12448. It changed GenerateJavaCallableWrappers from resolving the JLO path directly from assembly.ItemSpec to using the JavaObjectsXmlFile item metadata when present, as part of avoiding assembly staging.

The observed path suggests that this metadata is absent or not propagated for the packaged MAUI resource assembly, causing the fallback path to point inside the NuGet package where no sidecar exists.

Reproduction configuration

  • Target framework: net11.0-android
  • Runtime identifier: android-arm64
  • Microsoft.Maui.Controls.Core: 11.0.0-preview.7.26418.6
  • Android SDK workload: 37.0.0-rc.2.2294
  • Mono properties:
/p:UseMonoRuntime=true
/p:_DisableCheckForUnsupportedMonoMobileRuntime=true

Representative command shape:

dotnet publish MauiAndroidDefault.csproj \
  -c Release \
  -f net11.0-android \
  -r android-arm64 \
  --self-contained \
  -p:UseMonoRuntime=true \
  -p:_DisableCheckForUnsupportedMonoMobileRuntime=true

Affected CI jobs

The failure reproduces on two devices across two consecutive builds:

Expected behavior

A MAUI application consuming Microsoft.Maui.Controls.Core from NuGet should publish successfully with Mono. JLO lookup should use the generated/staged sidecar path rather than requiring a .jlo.xml file adjacent to the assembly inside the package.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions