-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.DllNotFoundException: libSkiaSharp exception is thrown in Blazor WASM .NET 8.0 #2745
Comments
Hi team, Any update on this? Regards, |
I was able to run your code after adding SkiaSharp.Views.Blazor package. https://www.nuget.org/packages/SkiaSharp.Views.Blazor/2.88.7. I'm using WASM .NET 8.0 Visual Studio 2022 version 17.9.1. |
You need to either install Try the latest versions as we have also fixed several packaging issues. |
I'm getting the same issue. I tried the latest release and the latest preview release. I found a thread from a few years ago #1725 Doing this is a work-around: <ItemGroup>
<NativeFileReference Include="$(HarfBuzzSharpStaticLibraryPath)\8.3.1-preview.1.2\*.a" />
</ItemGroup> |
Description
System.DllNotFoundException: libSkiaSharp exception is thrown while using SkiaSharp library in Blazor WASM .NET 8.0 and this issue doesn't occur in Blazor WASM .NET 6.0.
Stack trace:
System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
---> System.DllNotFoundException: libSkiaSharp
at SkiaSharp.SKImageInfo..cctor()
Note:
When trying the same approach in Blazor WASM .NET 6.0, there is no issues.
Code
Expected Behavior
Should draw the text and save as png.
Actual Behavior
Throws the above mentioned exception (System.DllNotFoundException: libSkiaSharp)
Version of SkiaSharp
2.88.6
Last Known Good Version of SkiaSharp
None
IDE / Editor
Visual Studio (Windows)
Platform / Operating System
Windows
Platform / Operating System Version
.NET 8.0
ASP.NET Core .NET 8.0 : Working fine
Blazor server side .NET 8.0 : Working fine
Blazor client side (WASM) .NET 8.0 : Facing Lib SkiaSharp issue
The text was updated successfully, but these errors were encountered: