Skip to content

[build] Default .NET 11 to target net11.0-android37 only#11254

Draft
jonathanpeppers wants to merge 3 commits intomainfrom
jonathanpeppers/default-api-37-target
Draft

[build] Default .NET 11 to target net11.0-android37 only#11254
jonathanpeppers wants to merge 3 commits intomainfrom
jonathanpeppers/default-api-37-target

Conversation

@jonathanpeppers
Copy link
Copy Markdown
Member

Stop building API 36.1 as a separate stable target and make net11.0-android37 the sole default target framework for .NET 11.

Changes:

  • Configuration.props: Set AndroidLatestStableApiLevel to 37, AndroidLatestStablePlatformId to 37.0 (explicit, since Google ships platform-37.0), framework version to v17.0. Unstable properties now reference stable (since they are the same). Updated AndroidLatestStableApiLevel2 comment example to 38.1.
  • AndroidToolchain.cs: Move isLatestStable from platform-36.1 to platform-37.0, remove isPreview flag
  • WorkloadManifest.in.json: Update workload packs from 36.1 to 37, add Mono/CoreCLR/NativeAOT runtime pack definitions for 37, remove 36.1 pack definitions
  • Xamarin.Android.Build.Tasks.targets: Use $(AndroidLatestStablePlatformId) for @SDK_PLATFORM_VERSION@ replacement instead of $(AndroidLatestStableApiLevel) (needed because ApiLevel=37 but PlatformId=37.0)
  • BuildTest.cs: Hardcode MinorApiLevelFallbackThrowsXA5207 to use 36.1 since 37.0 == 37 (no meaningful minor version distinction for this test scenario)

Note: AndroidLatestStablePlatformId is now explicitly set to 37.0 rather than defaulting to $(AndroidLatestStableApiLevel). This is because Google ships the platform as platform-37.0 (directory android-37.0), but the API level for TFMs and PublicAPI directories is just 37. Previous APIs (like 36 and 36.1) happened to have identical ApiLevel and PlatformId values.

jonathanpeppers and others added 3 commits April 30, 2026 10:41
Stop building API 36.1 as a separate stable target and make
net11.0-android37 the sole default target framework for .NET 11.

Changes:

- Configuration.props: Set AndroidLatestStableApiLevel to 37,
  AndroidLatestStablePlatformId to 37.0, framework version to v17.0.
  Unstable properties now reference stable (since they are the same).
- AndroidToolchain.cs: Move isLatestStable from platform-36.1 to
  platform-37.0, remove isPreview flag
- WorkloadManifest.in.json: Update workload packs from 36.1 to 37,
  add Mono/CoreCLR/NativeAOT runtime pack definitions for 37
- Xamarin.Android.Build.Tasks.targets: Use AndroidLatestStablePlatformId
  for SDK_PLATFORM_VERSION replacement (needed because ApiLevel=37 but
  PlatformId=37.0)
- BuildTest.cs: Hardcode MinorApiLevelFallbackThrowsXA5207 to use 36.1
  since 37.0 == 37 (no meaningful minor version distinction)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add acceptable-breakages-v17.0.txt for the v17.0 vs v16.1 API compat
check, and update acceptable-breakages-vReference-net11.0.txt with the
same breakages for the reference assembly comparison.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AndroidJavaRuntimeApiLevel was using AndroidLatestStableApiLevel (37),
but the Android SDK platform directory is android-37.0, not android-37.
Use AndroidLatestStablePlatformId (37.0) so java-runtime.csproj can
find android.jar.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant