Summary
FindSdkManagerPath() in SdkManager.Packages.cs and FindCmdlineTool() in ProcessUtils.cs use different precedence when resolving cmdline-tools binaries:
| Method |
Order |
Legacy tools/bin fallback |
FindSdkManagerPath |
Versioned dirs first → latest fallback |
✅ Yes |
FindCmdlineTool |
latest first → versioned dirs fallback |
❌ Removed |
The FindCmdlineTool order (latest first, no legacy fallback) was set per @jonathanpeppers review in #282. We should evaluate whether FindSdkManagerPath should be updated to match:
- Check
latest first — it is the SDK's own recommended default
- Remove legacy
tools/bin fallback — legacy tools have completely different CLI arguments
References
Summary
FindSdkManagerPath()inSdkManager.Packages.csandFindCmdlineTool()inProcessUtils.csuse different precedence when resolving cmdline-tools binaries:tools/binfallbackFindSdkManagerPathlatestfallbackFindCmdlineToollatestfirst → versioned dirs fallbackThe
FindCmdlineToolorder (latestfirst, no legacy fallback) was set per @jonathanpeppers review in #282. We should evaluate whetherFindSdkManagerPathshould be updated to match:latestfirst — it is the SDK's own recommended defaulttools/binfallback — legacy tools have completely different CLI argumentsReferences
FindSdkManagerPath:src/Xamarin.Android.Tools.AndroidSdk/SdkManager.Packages.cs:16FindCmdlineTool:src/Xamarin.Android.Tools.AndroidSdk/ProcessUtils.cs:240