PSIsafe: Issue 09.01: Could not load file or assembly 'CNG.API.Business' an attempt was made to load a program with an incorrect format

Problem: 
"System.BadImageFormatException:  Could not load file or assembly 'CNG.API.Business, Version=6.2.0.25, Culture=neutral, PublicKeyToken=null' or one of its dependencies.  An attempt was made to load a program with an incorrect format."
 
Solution: 
API DLLs are mixed-mode assemblies (have both native and managed code in them) so they're platform specific.  We only ship 32-bit versions of the binaries, so you either need to run it in a 32-bit O/S or you have to make your application run inside WoW64.  To force the application to run, using the CNG.API DLLs, in Wow64 you can go to the project properties in Visual Studio, select the "Compile" tab, select "Advanced Compiler Options" and set the "Target CPU" to x86.
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.