An unhandled exception of type 'System.BadImageFormatExcepti

Forum for discussing PicoScope version 6 (non-automotive version)
Post Reply
tmm
Newbie
Posts: 0
Joined: Sat Jun 09, 2018 12:39 pm

An unhandled exception of type 'System.BadImageFormatExcepti

Post by tmm »

Hi,

I am trying to run the PicoScope 6 example for windows "PS2000CSExample"
However, I am getting an exception at the line of opening unit

if ((handle = Imports.OpenUnit()) <= 0) <-- An unhandled exception of type 'System.BadImageFormatException' occurred in PS2000CSConsoleExample.exe


Development PC
Windows 10 64
Visual Studio 2015
Installed PicoScope 2204A -> PicoScope 6.12.9 Windows

Hitesh

Re: An unhandled exception of type 'System.BadImageFormatExc

Post by Hitesh »

Hi tmm,

If you have a 32-bit version of the PicoSDK installed, please ensure that you are building for an x86 platform, otherwise, please select the x64 platform in your build configuration.

Regards,

tmm
Newbie
Posts: 0
Joined: Sat Jun 09, 2018 12:39 pm

Re: An unhandled exception of type 'System.BadImageFormatExc

Post by tmm »

Compiling the project with 32-bit version solved my problem.

Thank you :)

Hitesh

Re: An unhandled exception of type 'System.BadImageFormatExc

Post by Hitesh »

Hi tmm,

That's good to hear! :D

Regards,

Post Reply