You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I tried implementing the bootData section for your example project:
// Providing implementation for 'GetHostName' function declared in 'HelloWorld' C# assembly.dotnet.HelloWorld.GetHostName=()=>"Browser";asyncfunctionloadfile(path){response=awaitfetch(path);// Examine the text in the responsebuffer=awaitresponse.arrayBuffer();returnBase64.fromUint8Array(newUint8Array(buffer));}window.onload=asyncfunction(){allfiles=["Microsoft.JSInterop.WebAssembly.dll","System.Collections.Concurrent.dll","System.Private.Runtime.InteropServices.JavaScript.dll","System.Collections.dll","Microsoft.AspNetCore.Components.Web.dll","System.Memory.dll","Microsoft.JSInterop.dll","Microsoft.AspNetCore.Components.WebAssembly.dll","System.Runtime.dll","System.Text.Json.dll","Microsoft.AspNetCore.Components.dll","System.Private.Uri.dll","System.Private.CoreLib.dll","System.Runtime.CompilerServices.Unsafe.dll","System.Console.dll","DotNetJS.dll","System.Text.Encodings.Web.dll","HelloWorld.dll",];assemblies=[];for(leti=0;i<allfiles.length;i++){assemblies.push({name: allfiles[i],data: awaitloadfile("Project/bin/Debug/net6.0/"+allfiles[i]),});}// Booting the DotNet runtime and invoking entry point.constbootData={wasm: awaitloadfile("Project/bin/Debug/net6.0/dotnet.wasm"),assemblies: assemblies,entryAssemblyName: "HelloWorld.dll",};awaitdotnet.boot(bootData);// Invoking 'GetName()' C# method defined in 'HelloWorld' assembly.constguestName=dotnet.HelloWorld.GetName();console.log(`Welcome, ${guestName}! Enjoy your global space.`);};
But I always get this error, any idea why?
dotnet.js:488 Uncaught (in promise) RuntimeError: abort(TypeError: WebAssembly.instantiate(): Import #0 module="a" error: module is not an object or function). Build with -s ASSERTIONS=1 for more info.
at abort (dotnet.js:488:25)
at dotnet.js:542:25
Remark:
I also tried the Project/bin/Debug/net6.0/publish/wwwroot/_framework/ Path.
The text was updated successfully, but these errors were encountered:
Hi,
I tried implementing the
bootData
section for your example project:But I always get this error, any idea why?
Remark:
I also tried the
Project/bin/Debug/net6.0/publish/wwwroot/_framework/
Path.The text was updated successfully, but these errors were encountered: