Skip to content

WasmEnableThreads incrementalism is broken #98502

@SteveSandersonMS

Description

@SteveSandersonMS

Description

If you have a Blazor WebAssembly app with WasmEnableThreads=true, and then change it to false, the build output is corrupted and won't work until you delete bin/obj and build again.

Reproduction Steps

  1. Create a .NET 9 Blazor WebAssembly app with WasmEnableThreads=true. Make sure you set this flag before you build for the first time.
  2. Run it from VS with Ctrl+F5 and observe it working
  3. Change WasmEnableThreads to false
  4. Ctrl+F5 again

Expected behavior

It should work in single-threaded mode

Actual behavior

It fails with:

image

Regression?

No

Known Workarounds

Delete bin & obj folders

(which unfortunately is not something we can expect developers to do in reality)

Configuration

.NET 9 WebAssembly

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions