1

I am creating nopCommerce plug-in for image compression using Magick.Net library, I make ImageOptimizer object and when calling LosslessCompress method it gives an error like unable to load dll Magick.NET-Q16-x64.Native.dll or one of its dependencies: The specified module could not be found.

I have found Magick.NET-Q16-x64.Native.dll and when I am trying to add a reference for that it gives an error like reference is invalid or unsupported

var file = new FileInfo(filepath);

var optimizer = new ImageOptimizer();

optimizer.LosslessCompress(file);

exception example

I expect no error occurs when LosslessCompress method runs and image is successfully compressed.

phuclv
  • 37,963
  • 15
  • 156
  • 475
Rohan
  • 11
  • 3
  • Check the build settings and see if you building for x64 – user11779008 Jul 13 '19 at 07:51
  • This is a normal mishap in a plugin scenario, the OS has no chance to find the DLL at runtime. You have to copy that DLL to a directory where it looks, preferably that is in the main EXE install directory. Or one of the directories listed in the PATH environment variable. Or, gack, to c:\windows\system32 – Hans Passant Jul 13 '19 at 10:15

0 Answers0