Open SteveSandersonMS opened 9 months ago
cc @lewing @pavelsavara
Note that a similar problem also happens when switching WasmEnableThreads from false
to true
without deleting bin/obj, which is even more confusing because then you will likely think that further config is required to enable threading, when it isn't.
Tagging subscribers to 'arch-wasm': @lewing See info in area-owners.md if you want to be subscribed.
Author: | SteveSandersonMS |
---|---|
Assignees: | - |
Labels: | `arch-wasm`, `untriaged`, `area-Build-mono`, `os-browser` |
Milestone: | - |
Thanks for pointing this out, we'll make sure it gets resolved
The problem is with conversion to webcil format. The ConvertDllsToWebCil
compares only file timestamp, but not if the original location has changed https://github.com/dotnet/runtime/blob/c768315c5698391f45a6a47d56fec4ba3df59fb8/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ConvertDllsToWebCil.cs#L70
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
Expected behavior
It should work in single-threaded mode
Actual behavior
It fails with:
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