Skip to content

[xaprepare] Remove desktop Mono provisioning and dead Mono-related code#11324

Merged
simonrozsival merged 3 commits into
mainfrom
jonathanpeppers/remove-mono-from-xaprepare
May 12, 2026
Merged

[xaprepare] Remove desktop Mono provisioning and dead Mono-related code#11324
simonrozsival merged 3 commits into
mainfrom
jonathanpeppers/remove-mono-from-xaprepare

Conversation

@jonathanpeppers
Copy link
Copy Markdown
Member

Summary

Part of incremental xaprepare removal. The UpdateMono xaprepare scenario is dead - the only Mono consumer (mdoc) is in the apidocs pipeline (azure-pipelines-apidocs.yaml) which provisions Mono itself via boots, not via xaprepare.

The emulator test pipelines passed updateMono: true but never actually used Mono for anything - it was leftover config.

Changes

xaprepare deletions

  • Deleted Scenario_UpdateMono.Unix.cs and MonoPkgProgram.MacOS.cs
  • Removed AllowMonoUpdate condition from KnownConditions.cs
  • Removed MonoDarwinPackageUrl, MonoRequiredMinimumVersion, MonoRequiredMaximumVersion, IgnoreMaxMonoVersion, IgnoreMinMonoVersion, ManagedRuntime from KnownProperties.cs, Properties.Defaults.cs.in, and xaprepare.targets
  • Removed MonoPkgProgram dependency from MacOS.cs

YAML cleanup

  • Removed updateMono parameter from setup-test-environment-steps.yaml, setup-test-environment-public.yaml, setup-test-environment.yaml
  • Removed updateMono: true from stage-msbuild-emulator-tests.yaml and azure-pipelines-public.yaml

Makefile cleanup

  • Removed RUNTIME variable (line 6 - Mono detection, unused)
  • Removed mono --version from run-all-tests
  • Removed shutdown-compiler-server target (VBCSCompiler kill - Mono-era MSBuild)
  • Removed prepare-update-mono target

Configuration.props cleanup

  • Removed ManagedRuntime, ManagedRuntimeArgs (zero consumers)
  • Removed MonoDarwinPackageUrl, MonoRequiredMinimumVersion, MonoRequiredMaximumVersion
  • Removed IgnoreMaxMonoVersion (2 lines)
  • Removed _Runtime, _NUnit (zero consumers)

Dead target deletion

  • Removed UpdateMonoAndroidContract target from api-compatibility.targets (zero callers, uses ancient net472 GenAPI.exe with $(ManagedRuntime))

Documentation

  • Updated dependencies.md and configuration.md to remove references to Mono version properties
  • Updated api-compatibility/README.md to note the removed target

The `UpdateMono` xaprepare scenario installs desktop Mono on macOS, but
the only consumer (mdoc in the apidocs pipeline) already installs Mono
independently via `boots`. The emulator test pipelines passed
`updateMono: true` but never actually used Mono for anything.

Also removes dead code:
- `ManagedRuntime`/`_Runtime`/`_NUnit` properties (zero consumers)
- `UpdateMonoAndroidContract` target (zero callers)
- `prepare-update-mono`/`shutdown-compiler-server` Makefile targets
- Mono version properties (MonoDarwinPackageUrl, etc.)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 11, 2026 15:36
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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 continues the incremental removal of xaprepare Mono provisioning by deleting the dead UpdateMono scenario and associated Mono version/configuration plumbing, and by cleaning up CI YAML/Makefile usage that no longer has any effect.

Changes:

  • Removed the UpdateMono xaprepare scenario and macOS Mono package provisioning code, along with related KnownConditions/KnownProperties.
  • Removed Mono-related MSBuild properties from Configuration.props and eliminated the dead UpdateMonoAndroidContract target.
  • Cleaned up Azure Pipelines templates and Makefile targets/variables that referenced Mono updates.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/api-compatibility/README.md Updates docs to reflect removal of the UpdateMonoAndroidContract target.
tests/api-compatibility/api-compatibility.targets Deletes the unused UpdateMonoAndroidContract target implementation.
Makefile Removes unused Mono detection/version printing and Mono-era helper targets.
Documentation/building/unix/dependencies.md Updates Unix dependency docs to no longer require Mono for local builds.
Documentation/building/configuration.md Removes documentation for Mono version enforcement properties.
Configuration.props Removes unused Mono provisioning/runtime properties with no remaining consumers.
build-tools/xaprepare/xaprepare/xaprepare.targets Removes replacements for deleted Mono-related properties in generated defaults.
build-tools/xaprepare/xaprepare/Scenarios/Scenario_UpdateMono.Unix.cs Deletes the dead UpdateMono scenario.
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/MacOS.cs Removes conditional Mono package dependency wiring.
build-tools/xaprepare/xaprepare/Application/Properties.Defaults.cs.in Removes default property entries for deleted Mono-related properties.
build-tools/xaprepare/xaprepare/Application/MonoPkgProgram.MacOS.cs Deletes macOS Mono package installer program implementation.
build-tools/xaprepare/xaprepare/Application/KnownProperties.cs Removes Mono-related property constants.
build-tools/xaprepare/xaprepare/Application/KnownConditions.cs Removes the Mono-update condition and updates related comments.
build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml Removes unused updateMono parameter usage.
build-tools/automation/yaml-templates/setup-test-environment.yaml Removes updateMono parameter plumb-through.
build-tools/automation/yaml-templates/setup-test-environment-steps.yaml Removes conditional xaprepare UpdateMono execution step.
build-tools/automation/yaml-templates/setup-test-environment-public.yaml Removes updateMono parameter plumb-through.
build-tools/automation/azure-pipelines-public.yaml Removes unused updateMono: true configuration.

Comment thread Documentation/building/unix/dependencies.md
Comment thread tests/api-compatibility/README.md Outdated
- Remove "Latest Mono" from dependency list in dependencies.md
- Use consistent Mono.Android.dll.zip naming in api-compatibility README
- Remove obsolete mono cil-strip.exe instructions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label May 11, 2026
@simonrozsival simonrozsival merged commit 607dbc9 into main May 12, 2026
2 of 3 checks passed
@simonrozsival simonrozsival deleted the jonathanpeppers/remove-mono-from-xaprepare branch May 12, 2026 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants