.NET Assembly Incorrect Format Error

“Could not load file or assembly ‘ChilkatDotNet2, Version=9.3.0.0, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd’ or one of its dependencies. An attempt was made to load a program with an incorrect format.” The “incorrect format” error is a 32-bit vs. 64-bit mismatch.  It means the application is trying to load a 64-bit .NET assembly into a 32-bit process,  or the reverse (a 32-bit assembly into […]

Chilkat .NET for x64 (64-bit Windows)

The “An attempt was made to load a program with an incorrect format.” indicates that your program attempted to load a win32 assembly on an x64 Windows OS, or the reverse. There is a separate Chilkat .NET assembly also named ChilkatDotNet2.dll for 64-bit Windows.  It may be downloaded at: http://www.chilkatsoft.com/downloads.asp This is for the 2.0/3.5 (or greater) Framework.  There is […]

x64 ActiveX Registration on Windows 2008 Server

For the most part, a 32-bit Chilkat ActiveX DLL will run on a 64-bit computer. However, there is an issue (to be explained here) that requires the ActiveX to be built specifically for x64. Chilkat provides separate 64-bit ActiveX’s on it’s downloads web page, and these should be used on x64 systems. The problem occurs when a method returns an […]

ChilkatDotNet2.dll on x64 from a Windows Service

Here’s the secret to getting the .NET runtime to load the ChilkatDotNet2.dll from a Windows Service: It must be installed in the GAC, but there’s a separate GAC for 64-bit assemblies: (with permission from the Chilkat customer) I was able to find a solution to this. I’m running a 64-bit version of Vista, and there turns out to be a […]

System.BadImageFormatException

This usually happens when trying to use the Chilkat 32-bit .NET 2.0 Assembly on a 64-bit system. Download and use the x64 build for the Chilkat .NET 2.0 Framework at http://www.chilkatsoft.com/downloads.asp Also, it’s likely that your development environment is 32-bit. You should add a reference to the 32-bit ChilkatDotNet2.dll, but deploy the 64-bit ChilkatDotNet2.dll to the x64 computer. Make sure […]