Remove UseLatestAndroidPlatformSdk - #10839
Merged
jonathanpeppers merged 2 commits intoFeb 19, 2026
Merged
Conversation
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove outdated UseLatestAndroidPlatformSdk references
Remove UseLatestAndroidPlatformSdk
Feb 19, 2026
jonathanpeppers
marked this pull request as ready for review
February 19, 2026 20:56
jonathanpeppers
requested review from
grendello and
simonrozsival
as code owners
February 19, 2026 20:56
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the legacy UseLatestAndroidPlatformSdk property from Xamarin.Android, which was a Xamarin.Android-era feature that has no use in the modern .NET Android SDK. The change treats this property as if it were always false and simplifies the code accordingly.
Changes:
- Removed
UseLatestAndroidPlatformSdkproperty and its associated logic fromResolveAndroidTooling.cs - Simplified
ValidateApiLevels()to only resolve via$(TargetFrameworkVersion)or$(AndroidApiLevel), loggingXA0000error if neither is set - Removed 7 test cases from
ResolveSdksTaskTests.csthat relied onUseLatestAndroidPlatformSdkbehavior and renamed test artifacts
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Xamarin.Android.Build.Tasks/Tasks/Legacy/ResolveAndroidTooling.cs | Removed UseLatestAndroidPlatformSdk property, GetMaxInstalledApiLevel() helper method, and simplified ValidateApiLevels() to only use TargetFrameworkVersion or AndroidApiLevel |
| src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Tasks/ResolveSdksTaskTests.cs | Removed TargetFrameworkPairing test and 6 parameterized test cases that used UseLatestAndroidPlatformSdk=true, renamed test data and method from UseLatestAndroidSdk* to ResolveAndroidTooling* |
jonathanpeppers
approved these changes
Feb 19, 2026
jonathanpeppers
deleted the
copilot/remove-use-latest-android-platform-sdk
branch
February 19, 2026 21:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Removes the legacy
UseLatestAndroidPlatformSdkconcept from Xamarin.Android. This property was a Xamarin.Android-era feature with no use in the .NET Android SDK — treating it as alwaysfalseand inlining accordingly.ResolveAndroidTooling.cs(Legacy task)UseLatestAndroidPlatformSdkpropertyValidateApiLevels()along with its priority-order commentGetMaxInstalledApiLevel()helper (only used by the removed branch)ValidateApiLevels()now only resolves via$(TargetFrameworkVersion)or$(AndroidApiLevel); logsXA0000if neither is setResolveSdksTaskTests.csTargetFrameworkPairingtest and data (relied entirely onUseLatestAndroidPlatformSdk = true)UseLatestAndroidPlatformSdk = trueand the implicit-fallback case where neither TFV nor API level was providedUseLatestAndroidSdkTestCases→ResolveAndroidToolingTestCases,UseLatestAndroidSdk→ResolveAndroidToolingTestUseLatestAndroidPlatformSdk = falsefromResolveSdkTiming💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.