Skip to content

The type initializer for 'SkiaSharp.SKImageInfo' threw an exception #2732

@kbrow20

Description

@kbrow20

Description

I am running running a webassembly blazor application and I included the nuget package for SkiaSharp and NativeAssets.WebAssembly. When I try and generate the QR barcode in my test environment on Windows it gives me this error message.

This is the first time trying to use SkiaSharp in a coding enivornment.

Code

using SkiaSharp;
using SkiaSharp.QrCode;

using MemoryStream ms = new();
QRCodeGenerator qrGenerator = new QRCodeGenerator();
QRCodeData qrCodeData = qrGenerator.CreateQrCode(Input, ECCLevel.L);
var info = new SKImageInfo(512, 512);
using var surface = SKSurface.Create(info);

Expected Behavior

No response

Actual Behavior

I get The type initializer for 'SkiaSharp.SKImageInfo' threw an exception with an inner exception of dllnotfound libSkiaSharp

Version of SkiaSharp

2.88.3 (Current)

Last Known Good Version of SkiaSharp

Other (Please indicate in the description)

IDE / Editor

Visual Studio (Windows)

Platform / Operating System

Windows

Platform / Operating System Version

Windows 11

Devices

No response

Relevant Screenshots

No response

Relevant Log Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Ready For Work

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions