-
-
Notifications
You must be signed in to change notification settings - Fork 437
Description
Magick.NET version
Magick.NET-Q16-x64
Environment (Operating system, version and so on)
Linux - Ubuntu 22.04.4
Description
Running .net 6 on an azure function v4 I get the following error message
System.DllNotFoundException: Unable to load shared library 'Magick.Native-Q16-x64.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libMagick.Native-Q16-x64.dll: cannot open shared object file: No such file or directory at ImageMagick.Environment.NativeMethods.X64.Environment_Initialize() at ImageMagick.Environment.NativeEnvironment.Initialize() in /_/src/Magick.NET/Native/Helpers/Environment.cs:line 65 at ImageMagick.Environment.Initialize() in /_/src/Magick.NET/Helpers/Environment.cs:line 21 at ImageMagick.MagickSettings.NativeMagickSettings..cctor() in /_/src/Magick.NET/Native/Settings/MagickSettings.cs:line 315
when executing the following code:
using var image = new MagickImage(imageStream);
My .csproj looks like this:
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<MagickCopyNativeLinux>true</MagickCopyNativeLinux>
</PropertyGroup>
<ItemGroup>
...
<PackageReference Include="Magick.NET-Q16-x64" Version="13.6.0" />
...
</ItemGroup>
I have seen other suggest that <MagickCopyNativeLinux>true</MagickCopyNativeLinux> fixes the issue, but it doesnt seem to work for me. Is this an azure function issue, or am I just doing something wrong?
It works fine on windows, and I'm not very experience with linux.
Steps to Reproduce
- Run on a linux machine, only tested with ubuntu and in azure (it doesnt specify linux version)
- Run azure function
- Execute code that uses the library