diff --git a/src/Resizetizer/src/SkiaSharpTools.Initializer.cs b/src/Resizetizer/src/SkiaSharpTools.Initializer.cs index f2a9be7..d2a7203 100644 --- a/src/Resizetizer/src/SkiaSharpTools.Initializer.cs +++ b/src/Resizetizer/src/SkiaSharpTools.Initializer.cs @@ -196,7 +196,7 @@ static IntPtr ImportResolver(string libraryName, Assembly assembly, DllImportSea if (libraryName.Equals("libHarfBuzzSharp", StringComparison.OrdinalIgnoreCase) || libraryName.Equals("HarfBuzzSharp", StringComparison.OrdinalIgnoreCase)) { - if (!LinuxTryLoad("libHarfBuzzSharp.dll", out libHandle) + if (!LinuxTryLoad("libHarfBuzzSharp.so", out libHandle) && !_tryLoad("libHarfBuzzSharp.dll", typeof(SkiaSharpTools).Assembly, searchFlags, out libHandle)) { throw new InvalidOperationException($"Failed to load libHarfBuzzSharp"); @@ -206,7 +206,7 @@ static IntPtr ImportResolver(string libraryName, Assembly assembly, DllImportSea if (libraryName.Equals("libSkiaSharp", StringComparison.OrdinalIgnoreCase) || libraryName.Equals("SkiaSharp", StringComparison.OrdinalIgnoreCase)) { - if (!LinuxTryLoad("libSkiaSharp.dll", out libHandle) + if (!LinuxTryLoad("libSkiaSharp.so", out libHandle) && !_tryLoad("libSkiaSharp.dll", typeof(SkiaSharpTools).Assembly, searchFlags, out libHandle)) { throw new InvalidOperationException($"Failed to load libSkiaSharp"); @@ -219,7 +219,7 @@ bool LinuxTryLoad(string path, out IntPtr handle) { foreach (var runtimePath in GetRuntimesFolder()) { - handle = Linux.dlopen(path); + handle = Linux.dlopen(Path.Combine(runtimePath, path)); if (handle != IntPtr.Zero) {