When running a .NET 8 project that depends on Imageflow, I ran into a nasty DllNotFoundException
. The error message suggested a 32-bit vs. 64-bit mismatch:
Error "%1 is not a valid Win32 application." (193) loading imageflow> You have installed a 32-bit (x86) copy of imageflow.dll but need the 64-bit (x86_64) version
At first, I thought I had placed the DLL incorrectly. It was sitting in:
bin\net8.0\runtimes\win-x64\native\imageflow.dll
Still, the app crashed. The catch? I was running Windows 11 ARM inside Parallels on a MacBook. That means .NET and native DLLs were running under emulation, and the default win-x64
build of Imageflow wasn’t compatible.
The Fix
The solution was to use the ARM64 build of Imageflow instead of the x64 one. I downloaded this release: imageflow-v2.1.1-rc11-win-arm64.zip
All available releases listed here: https://github.com/imazen/imageflow/releases
Then placed the DLL here:
bin\net8.0\runtimes\win-arm64\native\imageflow.dll
After that, everything worked perfectly.
Takeaway
If you’re on a Mac with Windows ARM in Parallels, and you hit native library errors like this, check if there’s an ARM64 build available. Sometimes, that’s all you need to get things running smoothly.