[Xamarin.AndroidTools] Remove dead VS Mac / legacy code#11607
Open
jonathanpeppers wants to merge 1 commit into
Open
[Xamarin.AndroidTools] Remove dead VS Mac / legacy code#11607jonathanpeppers wants to merge 1 commit into
jonathanpeppers wants to merge 1 commit into
Conversation
Context: after the `android-platform-support` repo was inlined here (see c22cdcf), `src/Xamarin.AndroidTools/` carries a large amount of code that was only used by old VS Mac / installer / debugger-host workflows that are no longer part of the .NET for Android product. None of these types have callers anywhere in this repo, in `external/xamarin-android-tools/`, or in `external/Java.Interop/`. Removed (13 files): * `PublicationUtilities/PublishAndroidApplication.cs` * `PublicationUtilities/PackageSigningTasks.cs` * `PublicationUtilities/KeyManagement.cs` * `PublicationUtilities/KeystoreEntry.cs` * `Sessions/AndroidDeploySession.cs` * `Sessions/AndroidConnectCommandSession.cs` * `Sessions/AndroidCommandSession.cs` * `Sessions/AndroidDeploymentException.cs` * `Devices/AndroidPackageList.cs` * `Devices/AndroidPackageListExtensions.cs` * `Debugging/MonoDroidProcessMonitor.cs` * `PlatformPackage.cs` * `IProgressNotifier.cs` * `AndroidSigningOptions.cs` Moved (still needed by `ProcessUtils.cs`): * `PublicationUtilities/AndroidSdkToolException.cs` -> `AndroidSdkToolException.cs` (namespace unchanged) Pruned from `Devices/AndroidDeviceExtensions.cs` (the methods only referenced the just-deleted types and had no in-tree callers): * `StartActivityWithCommandSession` (used `AndroidCommandSession`) * `GetDeploySession`, `GetPackagesAsync`, `GetPackages` (used `AndroidDeploySession` / `IProgressNotifier`) * `InstallSharedRuntime*` and `InstallSharedPlatform*` overloads that took `IProgressNotifier` * `GetPackageRemotePath`/`GetPackageRemotePathAsync` (used `AndroidDeploymentException`) * `GetFastDevRemotePath`/`GetFastDevRemotePathAsync` and the inner `FastDevRemotePathInfo` class (only consumer was `GetPackageRemotePathAsync`) Kept methods in `AndroidDeviceExtensions.cs` are the ones still used by `Xamarin.Android.Build.Debugging.Tasks` (`EnsureProperties`, `KillProcessAndWaitForExit`, `PushAndInstallPackageAsync`) and by `DebuggingExtensions` (`SetFastDevPropertyFile`, `GetProcessIDAsync`, `SetDebugPropertiesAsync`). Also cleaned up: * `Properties/Resources.resx` (English source): removed seven `CreateKeyError_*` strings that only `KeyManagement.cs` used. * `Properties/Resources.Designer.cs`: removed the seven matching properties. * `MonoDroidSdk.cs`: two `[Obsolete]` messages referenced the now-deleted `PlatformPackage`; changed to `"Do not use."`. Non-English `Resources.*.resx` and `Localize/loc/**/*.lcl` are left alone per repo policy (auto-regenerated by OneLocBuild). Build verified locally: * `src/Xamarin.AndroidTools/Xamarin.AndroidTools.csproj` * `src/Mono.AndroidTools/Mono.AndroidTools.csproj` * `src/Xamarin.Android.Build.Debugging.Tasks/Xamarin.Android.Build.Debugging.Tasks.csproj` * `src/Xamarin.Installer.AndroidSDK/Xamarin.Installer.AndroidSDK.csproj` Net change: -4225 / +2 lines across 19 files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes legacy VS Mac / installer / debugger-host code from src/Xamarin.AndroidTools/ that no longer has in-tree callers after the android-platform-support inlining, reducing the public surface area and trimming maintenance burden.
Changes:
- Deleted obsolete deployment/session, signing/keystore, package listing, and process-monitoring types that have no remaining consumers.
- Pruned
AndroidDeviceExtensionsAPIs that depended on the deleted session/deployment types, keeping only extensions still used by debugging/build tasks. - Cleaned up related resources and
[Obsolete]messages, and movedAndroidSdkToolExceptionto the project root (namespace unchanged).
Reviewed changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Xamarin.AndroidTools/PublicationUtilities/PublishAndroidApplication.cs | Removed legacy packaging/signing entrypoints. |
| src/Xamarin.AndroidTools/PublicationUtilities/PackageSigningTasks.cs | Removed legacy signing/alignment/keytool helpers. |
| src/Xamarin.AndroidTools/PublicationUtilities/KeyManagement.cs | Removed legacy keystore management APIs and resource usage. |
| src/Xamarin.AndroidTools/PublicationUtilities/KeystoreEntry.cs | Removed legacy keystore model type. |
| src/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs | Removed legacy deploy session implementation. |
| src/Xamarin.AndroidTools/Sessions/AndroidConnectCommandSession.cs | Removed legacy command-session connector used by old debugging flows. |
| src/Xamarin.AndroidTools/Sessions/AndroidCommandSession.cs | Removed legacy command-session protocol implementation. |
| src/Xamarin.AndroidTools/Sessions/AndroidDeploymentException.cs | Removed legacy deployment exception + failure reason enum. |
| src/Xamarin.AndroidTools/Devices/AndroidPackageList.cs | Removed obsolete package list wrapper type. |
| src/Xamarin.AndroidTools/Devices/AndroidPackageListExtensions.cs | Removed package list extension helpers tied to deleted platform/runtime install flows. |
| src/Xamarin.AndroidTools/Debugging/MonoDroidProcessMonitor.cs | Removed legacy logcat/PID monitoring helper for old debugger workflows. |
| src/Xamarin.AndroidTools/PlatformPackage.cs | Removed legacy platform APK generation/versioning helper. |
| src/Xamarin.AndroidTools/IProgressNotifier.cs | Removed legacy progress notifier abstraction used by deleted deploy/signing flows. |
| src/Xamarin.AndroidTools/AndroidSigningOptions.cs | Removed legacy signing options model + enum. |
| src/Xamarin.AndroidTools/AndroidSdkToolException.cs | Moved AndroidSdkToolException to project root (namespace unchanged). |
| src/Xamarin.AndroidTools/Devices/AndroidDeviceExtensions.cs | Pruned extension methods that referenced deleted deploy/session types; retained still-used APIs. |
| src/Xamarin.AndroidTools/Properties/Resources.resx | Removed now-unreferenced CreateKeyError_* strings. |
| src/Xamarin.AndroidTools/Properties/Resources.Designer.cs | Removed generated properties for deleted CreateKeyError_* resources. |
| src/Xamarin.AndroidTools/MonoDroidSdk.cs | Updated [Obsolete] messages that referenced removed PlatformPackage. |
Files not reviewed (1)
- src/Xamarin.AndroidTools/Properties/Resources.Designer.cs: Language not supported
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Context
After the
android-platform-supportrepo was inlined here (see c22cdcf),src/Xamarin.AndroidTools/carries a large amount of code that was only used by old VS Mac / installer / debugger-host workflows that are no longer part of the .NET for Android product. None of these types have callers anywhere in this repo, inexternal/xamarin-android-tools/, or inexternal/Java.Interop/.Removed (14 files)
PublicationUtilities/PublishAndroidApplication.csPublicationUtilities/PackageSigningTasks.csPublicationUtilities/KeyManagement.csPublicationUtilities/KeystoreEntry.csSessions/AndroidDeploySession.csSessions/AndroidConnectCommandSession.csSessions/AndroidCommandSession.csSessions/AndroidDeploymentException.csDevices/AndroidPackageList.csDevices/AndroidPackageListExtensions.csDebugging/MonoDroidProcessMonitor.csPlatformPackage.csIProgressNotifier.csAndroidSigningOptions.csMoved
PublicationUtilities/AndroidSdkToolException.cs->AndroidSdkToolException.cs(namespace unchanged; still required byProcessUtils.cs).Pruned from
Devices/AndroidDeviceExtensions.csThese methods only referenced the just-deleted types and had no callers in this repo:
StartActivityWithCommandSession(usedAndroidCommandSession)GetDeploySession,GetPackagesAsync,GetPackages(usedAndroidDeploySession/IProgressNotifier)InstallSharedRuntime*andInstallSharedPlatform*overloads that tookIProgressNotifierGetPackageRemotePath/GetPackageRemotePathAsync(usedAndroidDeploymentException)GetFastDevRemotePath/GetFastDevRemotePathAsyncand the innerFastDevRemotePathInfoclass (only consumer wasGetPackageRemotePathAsync)The kept extension methods in this file are still used by
Xamarin.Android.Build.Debugging.Tasks(EnsureProperties,KillProcessAndWaitForExit,PushAndInstallPackageAsync) and byDebuggingExtensions(SetFastDevPropertyFile,GetProcessIDAsync,SetDebugPropertiesAsync).Resource and
[Obsolete]cleanupProperties/Resources.resx(English source): removed sevenCreateKeyError_*strings whose only consumer wasKeyManagement.cs.Properties/Resources.Designer.cs: removed the seven matching properties.MonoDroidSdk.cs: two[Obsolete]messages referenced the now-deletedPlatformPackage; changed to"Do not use.".Non-English
Resources.*.resxandLocalize/loc/**/*.lclare left alone per repo policy (auto-regenerated by OneLocBuild).Notes
Xamarin.AndroidTools.dllis not a public NuGet package.Validation
Built locally on Windows:
src/Xamarin.AndroidTools/Xamarin.AndroidTools.csprojsrc/Mono.AndroidTools/Mono.AndroidTools.csprojsrc/Xamarin.Android.Build.Debugging.Tasks/Xamarin.Android.Build.Debugging.Tasks.csprojsrc/Xamarin.Installer.AndroidSDK/Xamarin.Installer.AndroidSDK.csprojAll build with no new warnings or errors.