Skip to content

CoreCLR+WebAssembly doesn't work on macOS #131799

Closed

Description

@jonpryor

Description

Attempts to use CoreCLR+WebAssembly with .NET 11 Preview 6 fails on macOS. It works on Linux and Windows.

Reproduction Steps

Create a blazorwasm project and set $(UseMonoRuntime)=false:

dotnet new blazorwasm -o blazorwasm-testapp
cd blazorwasm-testapp
cat <<'EOF' | git apply
diff --git a/blazorwasm-testapp.csproj b/blazorwasm-testapp.csproj
index 0c0a2f8..2a47a07 100644
--- a/blazorwasm-testapp.csproj
+++ b/blazorwasm-testapp.csproj
@@ -6,6 +6,7 @@
     <ImplicitUsings>enable</ImplicitUsings>
     <OverrideHtmlAssetPlaceholders>true</OverrideHtmlAssetPlaceholders>
     <StaticWebAssetSpaFallbackEnabled>true</StaticWebAssetSpaFallbackEnabled>
+    <UseMonoRuntime>false</UseMonoRuntime>
   </PropertyGroup>
 
   <ItemGroup>
EOF

Then build and/or run the project:

dotnet build

Expected behavior

It builds!

This succesfully happens on both Windows and Linux.

# Windows
> dotnet build
Restore complete (0.2s)
    info NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
  blazorwasm-testapp net11.0 browser-wasm succeeded (0.9s) → bin\Debug\net11.0\wwwroot

Build succeeded in 1.4s
# Linux
$ dotnet build
Restore complete (0.3s)
    info NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
  blazorwasm-testapp net11.0 browser-wasm succeeded (1.9s) → bin/Debug/net11.0/wwwroot

Build succeeded in 2.4s

Actual behavior

It does not build on macOS:

% dotnet build
Restore complete (0.2s)
    info NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
  blazorwasm-testapp net11.0 browser-wasm failed with 1 error(s) (0.2s)
    …/dotnet-sdk-11.0.100-preview.6.26359.118/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/11.0.0-preview.6.26359.118/Sdk/WasmApp.Common.targets(408,5): error Could not find JsonFilePath=$HOME/.nuget/packages/microsoft.netcore.app.runtime.browser-wasm/11.0.0-preview.6.26359.118/runtimes/browser-wasm/native/src/wasm-props.json

Build failed with 1 error(s) in 0.6s

Regression?

No. CoreCLR+WebAssembly is new to .NET 11.

Known Workarounds

No response

Configuration

No response

Other information

No response

Activity

  1. jonpryor commented on Aug 4, 2026

    @jonpryor
    ContributorAuthor

    WasmApp.Common.targets(408,5) is:

    <ReadWasmProps JsonFilePath="$(_WasmRuntimePackSrcDir)wasm-props.json">

    Furthermore, the <ReadWasmProps/> task is not mentioned in the binlog from the Linux build, nor is WasmApp.Common.targets!

  2. added this to the 11.0.0 milestone on Aug 4, 2026
  3. dotnet-policy-service commented on Aug 4, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
    See info in area-owners.md if you want to be subscribed.

  4. jonpryor commented on Aug 4, 2026

    @jonpryor
    ContributorAuthor

    After chatting with @pavelsavara on Discord, we have determined that .NET 11 Preview 7 fixes things on macOS.

    .NET 11 Preview 7: https://ci.dot.net/public/Sdk/11.0.100-preview.7.26381.103/dotnet-sdk-11.0.100-preview.7.26381.103-osx-arm64.tar.gz

    Linked from: https://github.com/dotnet/dotnet/blob/main/docs/builds-table.md

    Requires adding a nuget.config with the For .NET 11 builds contents:

    <configuration>
      <packageSources>
        <add key="dotnet11" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet11/nuget/v3/index.json" />
      </packageSources>
    </configuration>
  5. locked and limited conversation to collaborators on Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions