![]() |
![]() |
|
One of the most common issues/questions that has customers reaching out to support is the issue of "bitness"
DotImage contains a lot of unmanaged code, and this means we have x86 and x64 specific builds/DLLs, and the ability to target AnyCPU is not directly supported.
To further complicate matters, Microsoft exceptions are not always all that clear and user friendly.
System.BadImageFormatException
is mistaken for being something about image formats (as in DotImage, an Imaging toolkit). The equally unhelpful "An attempt was made to load a program with an incorrect format" message is often at the end of a long error message that looks nearly identical to several other exceptions.
Here is a roundup of our various "bitness-specific" KB articles
This is the most common bitness related exception and this article endeavors to cover desktop and web fixes for it
HOWTO: IIS Express in 64 bit / 32 bit
FAQ: Common Problems with x64 TWAIN Scanning
HOWTO: Run 32-bit DotImage Assemblies in an ASP.NET Application on a 64-bit Machine
FIX: Drag-Drop of Some Atalasoft Viewers Not Adding Control to Designer
Here is some general info about fixing compile time
If you are using Visual Studio 2022:
INFO: Visual Studio 2022 and Newer Now Native 64 Bit
If you are getting compile errors while targeting x64 in .NET 4.0 or up (on Visual Studio 2019 or older)
INFO: Workaround for a license compiler exception when targeting x64 in .NET framework 4.0 and up
2025-06-18 - TD