Skip to content

Enable wasm-tools workload for CoreCLR WASM targets#55324

Open
lewing wants to merge 1 commit into
mainfrom
lewing-wasm-tools-coreclr-runtime-pack
Open

Enable wasm-tools workload for CoreCLR WASM targets#55324
lewing wants to merge 1 commit into
mainfrom
lewing-wasm-tools-coreclr-runtime-pack

Conversation

@lewing

@lewing lewing commented Jul 16, 2026

Copy link
Copy Markdown
Member

Summary

Mirrors the workload manifest changes from dotnet/runtime#130380 into the SDK's copy of the Current (net11) Mono toolchain workload manifest. This enables the existing wasm-tools workload to target CoreCLR browser-wasm, in addition to Mono, by including the CoreCLR WASM runtime pack.

The workload manifests are authored in this repo under src/Workloads/Manifests/. The runtime PR changed the equivalent .in templates on its side; this PR reflects those same changes here so the shipped manifest stays in sync.

Changes

src/Workloads/Manifests/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/:

  • WorkloadManifest.json.in
    • Add Microsoft.NETCore.App.Runtime.${NetVersion}.browser-wasm (the CoreCLR runtime pack) to the wasm-tools workload's pack list.
    • Add the corresponding framework pack definition aliasing to Microsoft.NETCore.App.Runtime.browser-wasm.
  • WorkloadManifest.targets.in
    • Gate the Mono-only imports on '$(UseMonoRuntime)' != 'false':
      • the MonoAOTCompiler.Task import, and
      • the browser-wasm ImportGroup that pulls in MonoTargets.Sdk and the AOT.Cross pack.
    • Add a CoreCLR ('$(UseMonoRuntime)' == 'false') browser-wasm ImportGroup that only imports the WebAssembly.Sdk (build targets + Emscripten). The CoreCLR runtime pack and crossgen2 are resolved by the SDK via its own KnownRuntimePack/KnownCrossgen2Pack, so no MonoTargets.Sdk, MonoAOTCompiler, or AOT.Cross pack is needed.

Notes

  • Only the Current (net11) manifest is changed. The frozen net10/net9/… bands are intentionally left as-is, matching the runtime PR which targeted main.
  • Pack version tokens use this repo's ${RuntimeVersion} convention (resolving to the runtime pack package version) rather than runtime's ${PackageVersion}, consistent with the surrounding Mono framework pack entries.

Related

Reflects dotnet/runtime#130380 in the Current (net11) Mono toolchain
workload manifest: enables the wasm-tools workload to target CoreCLR
browser-wasm.

- WorkloadManifest.json.in: add the CoreCLR runtime pack
  (Microsoft.NETCore.App.Runtime.${NetVersion}.browser-wasm) to the
  wasm-tools pack list and define its framework alias to
  Microsoft.NETCore.App.Runtime.browser-wasm.
- WorkloadManifest.targets.in: gate the Mono-specific imports
  (MonoAOTCompiler.Task and the browser-wasm MonoTargets/AOT.Cross
  ImportGroup) on UseMonoRuntime != false, and add a CoreCLR
  (UseMonoRuntime == false) ImportGroup that only pulls in the
  WebAssembly.Sdk.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 50e9f740-621e-480d-a9cf-ed0e572a995e
Copilot AI review requested due to automatic review settings July 16, 2026 18:54
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
2 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.

Pull request overview

Updates the Current (net11) Mono toolchain workload manifest in dotnet/sdk to mirror dotnet/runtime#130380, enabling the existing wasm-tools workload to support CoreCLR browser-wasm (in addition to Mono) by including the CoreCLR WASM runtime pack and conditionally importing Mono-vs-CoreCLR build logic.

Changes:

  • Add the CoreCLR WASM runtime pack (Microsoft.NETCore.App.Runtime.${NetVersion}.browser-wasm) to the wasm-tools workload and define it as a framework pack with an alias-to.
  • Gate Mono-only MSBuild imports on $(UseMonoRuntime) != 'false' and add a CoreCLR-specific browser-wasm ImportGroup for $(UseMonoRuntime) == 'false' that imports only Microsoft.NET.Runtime.WebAssembly.Sdk.

Reviewed changes

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

File Description
src/Workloads/Manifests/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WorkloadManifest.targets.in Gates Mono-only imports on UseMonoRuntime and adds a CoreCLR browser-wasm import path that only brings in WebAssembly.Sdk.
src/Workloads/Manifests/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WorkloadManifest.json.in Adds the CoreCLR browser-wasm runtime pack to wasm-tools and defines the corresponding framework pack entry with an alias.

@lewing
lewing enabled auto-merge (squash) July 16, 2026 20:53
@lewing

lewing commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

@akoeplinger I don't understand what is going on with the helix monitor, it appears to just be stuck?

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.

4 participants