System.BadImageFormatException

G

Glenn Palomar

Hi,

I have VB.net application that I recently migrated from VS2003 to VS2005. It
works fine in Windows XP and 2K but NOT in XP64.

I get an exception error that says System.BadImageFormatException. I checked
the Advanced Compliler Settings and the Target CPU is set to AnyCPU. Setting
it x64 does not make a difference.

If I run my previous copy of the application built in VS2003 on the x64
system, it runs ok.

Any ideas?

Thanks,
Glenn
 
R

Robinson

I have VB.net application that I recently migrated from VS2003 to VS2005.
It works fine in Windows XP and 2K but NOT in XP64.

I get an exception error that says System.BadImageFormatException. I
checked the Advanced Compliler Settings and the Target CPU is set to
AnyCPU. Setting it x64 does not make a difference.

If I run my previous copy of the application built in VS2003 on the x64
system, it runs ok.

Any ideas?




Strange - I posted about this very issue just a few posts above with no
response so far. I recently tried migrating my 2003 project to 2005 and I
get the same thing from one of the projects in the solution. It's an x64
system, but 32 bit Windows.

I would love to know either what causes this, the solution or where best to
look for the solution.




Robin
 
G

Glenn Palomar

Hi Robin,

I found the solution to my problem. I needed to change the Target CPU from
"AnyCPU" to "x86" under Advanced Compiler Settings.

See if this will work for you.

Glenn
 
R

Robinson

Hi, checked it this morning, switched to x86 and still getting
BadImageFormat exception when I try to run the program in the debugger. I'm
a bit miffed to say the least.....
 
R

Robinson

Actually I managed to get one to compile x86 and the program runs, but it
fails when it loads one of my libraries - I switched it's project properties
to x86, but it still seems to insist on building it "AnyCPU" regardless of
what I do! ARGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH.

I've almost given up on the conversion to be honest. :/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top