Repository navigation
Retire Mono product build orchestration - #137518
Conversation
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 <223556219+Copilot@users.noreply.github.com>
|
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. |
There was a problem hiding this comment.
🟡 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.packagesand 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
|
Maybe we should merge dotnet/sdk#56480 in the same update cycle to enable next cleanup round. |
|
@am11 yeah my VMR PR has basically the same changes as that PR |
|
/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 |
<!-- --> 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 <223556219+Copilot@users.noreply.github.com>

Summary
Retire Mono from the top-level runtime product build and CI orchestration in favor of CoreCLR/NativeAOT:
usemonoruntimeswitches, and Mono CI/performance producers.clr.packages, preserving host, diagnostics, PGO, and shared ILLink outputs.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
git diff --checkpassed.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=falseto avoid an unrelated Debug WasmAppHost static-assets mismatch.Note
This pull request was prepared with GitHub Copilot.