Can I use Rhino3dm in a Blazor WebAssembly Standalone App

Hi all, This is not something I’m 100% comfortable in, but I’m trying to use the Rhino3dm package in a very small Blazor wasm app. But it give this error:

crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: librhino3dm_native
System.DllNotFoundException: librhino3dm_native

GPT give me this:
This error arises because the Blazor WebAssembly application, when rendering the “librhino3dm_native” component, attempts to access a native library named “librhino3dm_native.dll”. However, this library is either missing from the deployed application or not accessible for the WebAssembly environment.

In the nugget folder, I can find librhino3dm_native runtimes for linux, windows, OSX; But Blazor WebAssembly standalone apps run within the browser environment using .NET runtime.
Could this be the problem?

How does the JavaScript version of Rhino3dm cope with this? It runs using wasm?

What could I be missing here?

I’m running on:
TargetFramework>net8.0</TargetFramework
PackageReference Include=“Microsoft.AspNetCore.Components.WebAssembly” Version=“8.0.0” /
PackageReference Include=“Rhino3dm” Version=“8.4.0” /

Thank you for any assistance!

Hi @gieljan_vantyghem ,
Blazor apps run entirely within the clients browser using a .NET runtime thats compiled to WebAssembly. This setup allows .NET code to execute in the browser, but it operates in a sandbox.
You should indeed use the js version which should work just fine.
For reference : ASP.NET Core Blazor JavaScript interoperability (JS interop) | Microsoft Learn

Hope this clarifies things,
Farouk

That is the rhino3dm library for dotnet. If you need js webassembly you need rhino3dm for javascript: rhino3dm - npm