Skip to content

Retire Mono product build orchestration - #137518

Merged
akoeplinger merged 1 commit into
dotnet:mainfrom
akoeplinger:akoeplinger-runtime-mono-pack-defaults
Nov 14, 2026
Merged

akoeplinger merged 1 commit into
dotnet:mainfrom
akoeplinger:akoeplinger-runtime-mono-pack-defaults

Conversation

@akoeplinger

@akoeplinger akoeplinger commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Retire Mono from the top-level runtime product build and CI orchestration in favor of CoreCLR/NativeAOT:

  • Remove Mono subsets, capability predicates, cross-AOT/LLVM scheduling, obsolete usemonoruntime switches, and Mono CI/performance producers.
  • Move surviving mobile/WASI SDK and shared tooling producers into clr.packages, preserving host, diagnostics, PGO, and shared ILLink outputs.
  • Remove Mono runtime/cross-AOT/compiler-task demands from the current internal workload manifest; retain older-TFM manifests and the shared MonoTargets SDK required by surviving runtime-config consumers.
  • Retire Android x86 metadata/queue entries. Preserve other supported CoreCLR/NativeAOT RIDs.
  • Package the WASI CoreCLR targets and required PInvoke module props; keep browser/WASI CoreCLR relinking separate from NativeAOT publishing. WASI runtime-selection setters preserve explicit values for SDK validation.

Shipping workload manifests, bundled runtime metadata, VS insertion, and root VMR orchestration require the coordinated changes in dotnet/dotnet#10989. Runtime-produced manifest packages are excluded from publication by eng/Publishing.props.

Legacy standalone Mono sources, samples, functional tests, and unrelated mobile build-target/README cleanup are intentionally left for later.

Validation

  • Passed 101 actual MSBuild project/property evaluations covering default/all-packs desktop, mobile, browser, WASI, CodeQL configurations, source-only selection, pass2, shared producers, and retired Mono selectors.
  • Parsed five pipeline YAML files and passed three evaluations using actual CI job arguments.
  • Rebuilt browser and WASI SDK packages. Verified fresh extracted package contents/imports, NativeAOT/CoreCLR import separation, preservation of explicit WASI runtime selections, and actual ReadyToRun PInvoke-module task execution for both globalization modes.
  • Bash syntax/help, PowerShell parsing/help, and git diff --check passed.

No full cross-platform product build, native WASI link/run, mobile execution, NativeAOT publish/run, offline source build, or hosted VMR/CI execution was performed. Local package builds used EnableHotReloadInRuntimeConfigDevFile=false to avoid an unrelated Debug WasmAppHost static-assets mismatch.

Note

This pull request was prepared with GitHub Copilot.

Move surviving mobile and WebAssembly tooling producers to CoreCLR, retire Mono subsets and CI producers, and update current workload contracts while retaining downlevel manifests.

Co-authored-by: Copilot App <[email protected]>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 8 pipeline(s).
7 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Installed-workload builds fail on a missing compatibility header, non-ReadyToRun single-file bundling produces no application .wasm, and CoreCLR builds silently ignore native inputs.

3 open issues
What changed in this PR

Retires Mono from top-level runtime product builds and CI, shifting surviving shared tooling and workload packages to CoreCLR/NativeAOT orchestration. Companion dotnet/dotnet#10989 coordinates SDK manifests and VMR integration.

Changes:

  • Removes Mono build subsets, cross-AOT scheduling, obsolete switches, and CI/performance producers.
  • Moves shared package production into clr.packages and selects CoreCLR WASI targets without invoking them for NativeAOT publishing.
  • Removes current-manifest Mono pack demands and Android x86 orchestration while retaining older-framework manifests and shared tooling.
File Description
src/​tasks/​tasks.proj Excludes the Mono AOT compiler task from product builds.
src/​mono/​wasi/​build/​WasiApp.targets Selects CoreCLR and removes Mono linker substitutions.
src/​mono/​wasi/​build/​WasiApp.CoreCLR.targets Adds packaged P/Invoke props resolution and conditional runtime defaults.
src/​mono/​nuget/​Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/​WorkloadManifest.Wasi.targets.in Enables the current WASI workload and scopes older-framework rejection.
src/​mono/​nuget/​Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/​WorkloadManifest.targets.in Updates runtime selection, pack metadata, imports, and native-library validation.
src/​mono/​nuget/​Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/​WorkloadManifest.json.in Removes current Mono runtime/compiler packs and selects CoreCLR for WASI.
src/​mono/​nuget/​Microsoft.NET.Runtime.WebAssembly.Wasi.Sdk/​Sdk/​Sdk.targets Imports CoreCLR WASI targets outside NativeAOT publishing.
src/​mono/​nuget/​Microsoft.NET.Runtime.WebAssembly.Wasi.Sdk/​Sdk/​Sdk.props Defaults to CoreCLR without overwriting explicit runtime selection.
src/​mono/​nuget/​Microsoft.NET.Runtime.WebAssembly.Wasi.Sdk/​Microsoft.NET.Runtime.WebAssembly.Wasi.Sdk.pkgproj Packages CoreCLR targets and P/Invoke module props.
src/​mono/​nuget/​Microsoft.NET.Runtime.WebAssembly.Sdk/​Sdk/​Sdk.targets Excludes CoreCLR relinking targets from NativeAOT publishing.
src/​mono/​nuget/​Microsoft.NET.Runtime.LibraryBuilder.Sdk/​Sdk/​Sdk.props Changes the library-builder runtime selection to CoreCLR.
src/​coreclr/​.nuget/​coreclr-packages.proj Adds surviving WASI, mobile, and shared package producers.
eng/​testing/​tests.ioslike.targets Stops forwarding Mono LLVM settings.
eng/​targetingpacks.targets Removes Android x86 from local pack metadata.
eng/​Subsets.props Removes Mono orchestration and revises CoreCLR/NativeAOT build selection.
eng/​Signing.props Removes Mono-specific artifact rules and updates shared-package selection.
eng/​pipelines/​runtime.yml Removes Mono producers and expands CoreCLR WASI scheduling.
eng/​pipelines/​performance/​templates/​perf-wasm-prepare-artifacts-steps.yml Defaults to CoreCLR artifacts and removes Mono package handoffs.
eng/​pipelines/​performance/​templates/​perf-wasm-build-jobs.yml Removes the optional Mono performance build.
eng/​pipelines/​performance/​perf-build.yml Removes the Mono WebAssembly build parameter and selections.
eng/​pipelines/​libraries/​helix-queues-setup.yml Removes Android x86 queue selection.
eng/​pipelines/​common/​templates/​wasm-build-only.yml Deletes the Mono WebAssembly build-only template.
eng/​pipelines/​common/​platform-matrix.yml Removes the Android x86 platform entry.
eng/​build.sh Removes the usemonoruntime switch and help text.
eng/​build.ps1 Removes the usemonoruntime parameter and forwarding.
docs/​workflow/​testing/​libraries/​testing-apple.md Removes AOT-LLVM testing instructions.
docs/​workflow/​testing/​libraries/​testing-android.md Removes AOT-LLVM testing instructions.
Directory.Build.props Removes forced mobile-manifest and Mono cross-AOT setup.

Review effort: Balanced

@am11

am11 commented Nov 13, 2026

Copy link
Copy Markdown
Member

Maybe we should merge dotnet/sdk#56480 in the same update cycle to enable next cleanup round.

@akoeplinger

Copy link
Copy Markdown
Member Author

@am11 yeah my VMR PR has basically the same changes as that PR

@akoeplinger

Copy link
Copy Markdown
Member Author

/ba-g unrelated test failures and two WBT failures, one is preexisting #137492 and the other one I'll file a follow-up PR for

@akoeplinger
akoeplinger merged commit 095f5e1 into dotnet:main Nov 14, 2026
184 of 192 checks passed
akoeplinger added a commit that referenced this pull request Nov 14, 2026
<!-- -->
Follow-up to #137518, based on latest main
(`095f5e151e743e5b18db8004cb864da965857efe`). Addresses the two WBT
failure causes observed on Linux and Windows in [build
1680523](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1680523).

- Align the current workload manifest's crossgen2 package version with
the selected CoreCLR runtime version. The multi-client Blazor test
otherwise combines runtime `12.0.0-ci` with SDK crossgen2
`12.0.0-alpha.1.26561.116`, generating incompatible callhelpers and
failing to link `ResolveRuntimeHelperEntrypoint`.
- Make `UnusedCoreLibEntryPointsAreTrimmed` workload-only and remove its
obsolete no-workload setup. It requires native relinking/Emscripten,
which is not available in the no-workload lane. All four test data
sources and native trimming assertions remain intact. This addresses the
failure tracked in #137492.

## Validation

- `./.dotnet/dotnet build
src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj -c Release
-p:TargetOS=browser -p:TargetArchitecture=wasm -p:RuntimeFlavor=CoreCLR
-p:InstallWorkloadForTesting=false -p:InstallChromeForTests=false
-p:InstallFirefoxForTests=false -p:InstallV8ForTests=false` — passed.
- `./.dotnet/dotnet msbuild
src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest.pkgproj
-t:Build -p:TargetOS=browser -p:TargetArchitecture=wasm
-p:RuntimeFlavor=CoreCLR` — passed.
- Inspected compiled test metadata: workload category retained,
no-workload category absent, all four data sources retained.
- Five MSBuild evaluations against the freshly extracted manifest
package passed: browser/WASI compiler and runtime versions match;
unaffected desktop and downlevel metadata remain unchanged. The mismatch
was reproduced against the preceding package before the fix.
- `git diff --check` — passed.

Full native publish/browser execution and hosted WBT were not rerun
locally.

> [!NOTE]
> This pull request was prepared with GitHub Copilot.

Co-authored-by: Copilot App <[email protected]>
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants