Skip to content

[Xamarin.AndroidTools] Remove dead VS Mac / legacy code#11607

Open
jonathanpeppers wants to merge 1 commit into
mainfrom
jonathanpeppers/platform-support-cleanup
Open

[Xamarin.AndroidTools] Remove dead VS Mac / legacy code#11607
jonathanpeppers wants to merge 1 commit into
mainfrom
jonathanpeppers/platform-support-cleanup

Conversation

@jonathanpeppers
Copy link
Copy Markdown
Member

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 (14 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

PublicationUtilities/AndroidSdkToolException.cs -> AndroidSdkToolException.cs (namespace unchanged; still required by ProcessUtils.cs).

Pruned from Devices/AndroidDeviceExtensions.cs

These methods only referenced the just-deleted types and had no callers in this repo:

  • 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)

The kept extension methods in this file are still used by Xamarin.Android.Build.Debugging.Tasks (EnsureProperties, KillProcessAndWaitForExit, PushAndInstallPackageAsync) and by DebuggingExtensions (SetFastDevPropertyFile, GetProcessIDAsync, SetDebugPropertiesAsync).

Resource and [Obsolete] cleanup

  • Properties/Resources.resx (English source): removed seven CreateKeyError_* strings whose only consumer was KeyManagement.cs.
  • 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).

Notes

  • Public API surface reduction is intentional and follows the precedent of the consolidation merge commit. These types were public, but they have zero in-tree callers and Xamarin.AndroidTools.dll is not a public NuGet package.
  • Net change: -4,225 / +2 lines across 19 files.

Validation

Built locally on Windows:

  • 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

All build with no new warnings or errors.

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>
Copilot AI review requested due to automatic review settings June 8, 2026 14:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AndroidDeviceExtensions APIs 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 moved AndroidSdkToolException to 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

@jonathanpeppers
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

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.

2 participants