System.DllNotFoundException: libHarfBuzzSharp in a Blazor WASM


I am getting the error below when converting an Excel file to HTML in a Blazor WASM app.
The same code works in a regular .NET Core app.

System.DllNotFoundException: libHarfBuzzSharp

Is there something special that needs to be done for Gembox to work in a Blazor app?

Thank you.


Besides installing GemBox.Spreadsheet, for Blazor WebAssembly, you’ll also need to include its native dependencies.
Please check the last snippet code on the following page:

Or use something like this:

<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">


    <PackageReference Include="GemBox.Spreadsheet" Version="*" />
    <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="*" />
    <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="*" PrivateAssets="all" />

  <!-- Add HarfBuzzSharp and SkiaSharp native assets. -->
    <PackageReference Include="HarfBuzzSharp.NativeAssets.WebAssembly" Version="7.3.0" />
    <NativeFileReference Include="$(HarfBuzzSharpStaticLibraryPath)\3.1.34\**\*.a" />
    <PackageReference Include="SkiaSharp.NativeAssets.WebAssembly" Version="2.88.6" />
    <NativeFileReference Include="$(SkiaSharpStaticLibraryPath)\3.1.34\**\*.a" />


I hope this helps.