- 
                Notifications
    
You must be signed in to change notification settings  - Fork 5.2k
 
Closed
Labels
Milestone
Description
Compiling with dotnet publish -c Release -p:RunAOTCompilation=true -p:PublishTrimmed=true -p:WasmEnableThreads=true results in crashes at runtime
- 
Install 7.0.100-rc.2.22462.1 from dotnet/installer
 - 
create a NuGet.config for the dotnet7 feed
<configuration> <packageSources> <add key="dotnet7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json" /> </packageSources> </configuration>
 - 
install the
wasm-experimentalworkload usingdotnet workload install wasm-experimental - 
create a new app from the
wasmbrowsertemplate:dotnet new wasmbrowser - 
Publish with threads, AOT and trimming
dotnet publish -c Release -p:RunAOTCompilation=true -p:PublishTrimmed=true -p:WasmEnableThreads=true 
Result:
dotnet.js:5 Error: [MONO] * Assertion at /__w/1/s/src/mono/mono/metadata/exception.c:64, condition `is_ok (error)' not met, function:mono_exception_new_by_name, (null) assembly:System.Private.CoreLib.dll type:ArgumentException member:(null)
    at ke (dotnet.js:5:509)
    at Object.Ne (dotnet.js:5:792)
    at _mono_wasm_trace_logger (dotnet.js:14:101296)
    at :50266/dotnet.wasm
    at :50266/dotnet.wasm
    at :50266/dotnet.wasm
    at :50266/dotnet.wasm
    at :50266/dotnet.wasm
    at :50266/dotnet.wasm
    at :50266/dotnet.wasm
Ne @ dotnet.js:5
