473,403 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

System.BadImageFormatException

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
Oct 19 '06 #1
4 9274
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
Oct 20 '06 #2
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

"Robinson" <to******************@myinboxtoomuchtoooften.comwr ote in
message news:eh*******************@news.demon.co.uk...
>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

Oct 20 '06 #3

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.....


"Glenn Palomar" <gl***********@autodesk.comwrote in message
news:OS**************@TK2MSFTNGP02.phx.gbl...
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

"Robinson" <to******************@myinboxtoomuchtoooften.comwr ote in
message news:eh*******************@news.demon.co.uk...
>>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


Oct 23 '06 #4
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! ARGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH HHHHHHHHHHHHHH.

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

"Robinson" <to******************@myinboxtoomuchtoooften.comwr ote in
message news:eh*******************@news.demon.co.uk...
>
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.....


"Glenn Palomar" <gl***********@autodesk.comwrote in message
news:OS**************@TK2MSFTNGP02.phx.gbl...
>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

"Robinson" <to******************@myinboxtoomuchtoooften.comwr ote in
message news:eh*******************@news.demon.co.uk...
>>>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



Oct 23 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: | last post by:
Hello, I have written an application in .NET (C#) which uses some stuff from the Microsoft.mshtml. Unfortunately some customers reported that they are missing this DLL. Therefore we now...
3
by: Madhu Gopinathan | last post by:
Hi, I am facing a problem in .NET COM InterOp. I have a COM Dll which I want to use from my CSharp code. So, I import the TLB directly from the DLL using the tlbimp tool to a managed DLL. I add a...
3
by: Installutil System.BadImageFormatExcepti | last post by:
I've tried to make a Windows Service using the 2005 C# and when I go to use Installutil it returns with an System.BadImageFormatException error while intializing the installation. I've even gone as...
1
by: cwjacklin | last post by:
I read this article on http://msdn.microsoft.com/msdnmag/issues/03/07/NET/ which describes how to invoke C win32 dll from C# But I am running into a weird situation. I have an existing C...
4
by: Roger Aikin | last post by:
I've converted a VB6 project to VB.Net 2005. (Actually using vstudio pro 2005). I'm on a machine that also has VB6 and Vstudio.net 2003 on it. The project uses Word, Excel, MapPoint and SqlClient...
3
by: NickP | last post by:
Hi there, Today I try to compile an application of mine and I am getting a whole list of bizaar errors.... ------------------------------------------------ Error 1 The...
0
by: kotti | last post by:
How to catch or rectify the System.badImageFormatException in c# while trying to debug the .cs file in Nunit.
4
by: =?Utf-8?B?aWduaGVucnk=?= | last post by:
I have mixed-mode multi-file assembly of several netmodules and a dll. All are generated using c# compiler, vc++ compiler and vc++ linker from command prompt. I can browse the content of the...
3
by: John A Grandy | last post by:
VS2005 ( all updates ) on XP ( all updates ) I have a solution with many projects and a substantial reference tree. I have a Windows Application project that will build but not run. It fails...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.