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

Using Magick.NET DLL in a Windows Forms app for both 64bit and 32bit Windows 7

Aug 19, 2014 at 6:19 PM
I have a Windows Forms app that uses Magick.NET DLL. I'm doing my development on a 64-bit Windows 7 platform. And my application runs perfectly.
However I have a few users that are still on 32-bit Windows 7. My app also works perfectly on their machine also except when I call Magick.NET interfaces and I get:-
Could not load file or assembly 'Magick.NET-x64, Version=, Culture=neutral, PublicKeyToken=2004825badfa91ec' or one of its dependencies.

I'm using .NET4.0 with the Magick.NET-x64.DLL and my app is set to compile for "Any CPU".
I'm afraid I don't understand process interoperability too well. What am I doing well. How can I make my Windows Forms app be backwards compatible with 32-bit Windows 7 machines?

Aug 19, 2014 at 9:05 PM
You should use the Magick.NET-AnyCPU.dll if you set your build to "AnyCPU". You can download the file "" or use the AnyCPU NuGet package.
Aug 19, 2014 at 10:24 PM
Thanks! That looks promising. But I'm still having trouble, I installed the package using NuGet. Now on my 64-bit dev machine I see Magick.NET-AnyCPU in my References. And I see Magick.NET-AnyCPU.dll in my list of "Application Files" with PublishStaus=Include, DownloadGroup=required, Hash=Include.

Yet when I Publish (with OneClick) and install the Windows Forms app on my 32-bit machine I'm now getting the following error (when I call a Magick.NET interface):-
Message : Failed to load embedded assembly: Could not load file or assembly 'Magick.NET-Q16-x86.dll' or one of its dependencies. The specified module could not be found.

What am I missing?
Aug 19, 2014 at 10:43 PM
Edited Aug 19, 2014 at 10:44 PM
The Magick.NET AnyCPU library will use the Magick.NET-Q16-x86.dll or the Magick.NET-Q16-x64.dll library depending on your operating system. So it is correct that it is reporting an error about the 'Magick.NET-Q16-x86.dll' library. The error message The specified module could not be found is most likely being raised because your 32 bit machine does not have the 'Visual C++ Redistributable for Visual Studio 2012' (see documentation for a link) installed. Maybe you can include this in the prerequisites of OneClick? I never heard of OneClick, are you talking about ClickOnce?
Aug 19, 2014 at 10:45 PM
Yes, ClickOnce :-) sorry. I'll try that. Thanks!