Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.
This repository was archived by the owner on Dec 21, 2023. It is now read-only.

System.DllNotFoundException #494

@shashanksivakoti

Description

@shashanksivakoti

Hi Team,

I am facing one issue like System.DllNotFoundException after deploying my changes on Dev Environment using Azure pipeline,

Exception The type initializer for 'SkiaSharp.SKImageInfo' threw an exception. Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: Error loading shared library liblibSkiaSharp: No such file or directory

I am using this for .Net Standard 2.1 project file.

Code:
using System.IO;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Graphics.Skia;

private string DrawLegendWithLine(String stroke, String strokeWidth )
{
string imageBase64 = "";
// Create a bitmap in memory and draw on its Canvas
SkiaBitmapExportContext bmp = new SkiaBitmapExportContext(100, 50, 1.0f);
ICanvas canvas = bmp.Canvas;
canvas.StrokeColor = Color.FromRgba(stroke);
canvas.StrokeSize = 10;
canvas.DrawLine(100, 0, 0, 0);
using (var ms = new MemoryStream())
{
bmp.WriteToStream(ms);
imageBase64 = Convert.ToBase64String(ms.GetBuffer(), 0, checked((int)ms.Length));
}
return imageBase64;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions