This project has moved. For the latest updates, please go here.

ImageMagick.NET – appears to have Failed to load embedded x64 assembly when using anycpu package

Oct 29, 2015 at 7:35 PM
I suspect the x64 assembly is failing to load.

Actually, the error I am seeing is in the Event Viewer:
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
Stack:
at ImageMagick.MagickImage.DisposeInstance()
at ImageMagick.MagickImage.Finalize()

Developing with VS2015 vb.net forms application on a 32bit windows 7 machine. Deploying to a 64bit windows 2008 R2 server. In my application I am using the magick.net-q16-anycpu package. This works fine locally, but I get the exception above on the server.
  • Also, note, on the server I have installed both the 32bit and 64bit C++ Redistributable
Also, I can get it to work on the server if I replace the magick.net anycpu package with the 64bit package. Obviously this is fine for the server, but I can’t run or debug locally.

Any tips on getting the anycpu version to work both locally and on the server?

Thanks.
Coordinator
Oct 30, 2015 at 10:10 AM
Have you tried setting the MagickAnyCPU.CacheDirectory on your production server as described in the documentation?
Oct 30, 2015 at 2:12 PM
Yes, this is required. I thought I tried it before and it didn't work. Anyway it is working perfectly now after tying again. Thanks for your help.

Great Library - 5 star review just posted.