SkiaSharp.QrCode: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
If i build this for linux, i get the error:
The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
Exception:
---> System.DllNotFoundException: Unable to load DLL 'libSkiaSharp' or one of its dependencies: The specified module could not be found. (0x8007007E)
at SkiaSharp.SkiaApi.sk_colortype_get_default_8888()
at SkiaSharp.SKImageInfo..cctor()
--- End of inner exception stack trace ---
at SkiaSharp.SKImageInfo..ctor(Int32 width, Int32 height)
at AT.QRCoder.DiscordBot.Commands.QrCoder.GenerateQr(String content, String darkColor, String lightColor, String iconUrl) in C:\Users\Name\Desktop\ProjName\src\Proj.ProjName\Commands\File.cs:line 30```
at this line:
` var info = new SKImageInfo(660, 660);`
Do you know what causes that and how to fix that?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 21 (14 by maintainers)
I still get the same error using the following package references:
Thanks for the reply, these are my package references:
no update? let’s close issue.
A Dockerfile I’ve pushed to your repo was
FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim AS base
, Debian 10 env and it runs successfully.@AlexGipp Sorry I was down for these days, Let me check tonight.
thank you, I will check it later.
@AlexGipp Can you try with following package?
update: I’ve released 0.4.1. Please use 0.4.1 and
SkiaSharp.NativeAssets.Linux.NoDependencies
if you have no dependencies to fonts.In your case,