Can't find libSkiaSharp when creating SKBitmap C#

DiamondKesha 31 Reputation points

Hello. When i trying create SKBitmap i get error -

I'm try use older and newest version of SkiaSharp, but it didn't help. How i can fix this problem?
I'm use Balzor WebAssembly .Net Core 6.

A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,496 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Zhi Lv - MSFT 32,096 Reputation points Microsoft Vendor

    Hi @DiamondKesha ,

    You can refer to this sample: SkiaSharp on Blazor Web Assembly

    In the Blazor WebAssembly application, try to add the following in the PropertyGroup:


    and add this in the ItemGroup:

    	<NativeFileReference Include="$(SkiaSharpStaticLibraryPath)\2.0.23\*.a" />  

    The SkiaSharp version is 2.88.0-preview.145 version.

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,