-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[browser][MT] WasmEnableThreads=true should fail without workload installed #98496
Comments
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsDescriptionThe By default, people do not have the This doesn't help the developer to understand the problem or how to fix it. Reproduction StepsUsing an SDK without Expected behaviorIdeally it would fail at build time with a message like The second best behavior would be failing at runtime with a message like the above. Actual behaviorCurrently it fails saying "Can't find method ... InstallMainSynchronizationContext", giving no clue how to fix it. Regression?No Known Workaroundsn/a Configuration.NET 9 + WebAssembly Other informationNo response
|
I think this |
|
Yeah, I'm not 100% sure this failure is related but making sure the workload is installed for mt will reduce configurations we're testing for MT immediately which will reduce the search space. |
The reported error has the same cause as #98502. MT apps should be working without workload |
Description
The
wasm-tools
workload is required to build a multithreading-enabled WebAssembly app.By default, people do not have the
wasm-tools
workload installed. In this scenario, if they create a Blazor WebAssembly app and set<WasmEnableThreads>true</WasmEnableThreads>
, then it will fail at runtime as follows:This doesn't help the developer to understand the problem or how to fix it.
Reproduction Steps
Using an SDK without
wasm-tools
, create a .NET 9 Blazor WebAssembly Standalone app, set<WasmEnableThreads>true</WasmEnableThreads>
, anddotnet run
.Expected behavior
Ideally it would fail at build time with a message like
WasmEnableThreads is set to true, but the wasm-tools workload is not installed. To build this project, first run 'dotnet workload install wasm-tools'
.The second best behavior would be failing at runtime with a message like the above.
Actual behavior
Currently it fails saying "Can't find method ... InstallMainSynchronizationContext", giving no clue how to fix it.
Regression?
No
Known Workarounds
n/a
Configuration
.NET 9 + WebAssembly
Other information
No response
The text was updated successfully, but these errors were encountered: