-
Note: I've posted this issue on Stackoverflow, but this seems like an issue with the library. I'm trying to use Magick.NET library to do image processing on Azure Functions. I have tried the same code in a Console App (.NET Core 3.1) which works without any issues. However when running the same code in an Azure Functions Project, I get the following error. Code:
Exception:
StackTrace:
Inner Exception:
Inner Exception StackTrace
I believe this is due to the way Azure Functions package is organized and the path Magick.NET is looking for its native binary to load. I can confirm that the native binary is written at I have traced the apps using ProcessMonitor for each app and can see Function app looks in the wrong location. It looks in
instead of
(Below traces are filtered to only show I have also tried setting After building, if I copy So, is there a workaround to get ImageMagick to load native lib from the right place? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
UPDATE This issue appears to happen only when using It does not appear when using older versions. I have successfully used |
Beta Was this translation helpful? Give feedback.
-
Potential workaround Add following to csproj
or right click project > properties > Build Events and paste the above command to This will copy all of the edit: updated the command to have /Y |
Beta Was this translation helpful? Give feedback.
-
This looks more like an issue with the project system itself? This library is following the standards of where the files should be in the NuGet package. You could use |
Beta Was this translation helpful? Give feedback.
This looks more like an issue with the project system itself? This library is following the standards of where the files should be in the NuGet package. You could use
MagickNET.SetNativeLibraryDirectory
as a work around for your issue instead of copying the files.