473,386 Members | 1,758 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,386 software developers and data experts.

VS2005 BadImageFormatException msmq

Hi all,

I am trying to port an application developed with VS2003 to VS2005. The
project builds successfuly but when I run it, it throws a
BadImageFormatException in the following line of code in the
constructor of my main form :

....
if
(!System.Messaging.MessageQueue.Exists(@".\Private $\CentralInQueue"))
....

The exception window title is:
BadImageFormatException was unhandled.

The exception message is:
An attempt was made to load a program with an incorrect format.
(Exception from HRESULT: 0x8007000B)

The version of the application that was compiled using VS2003 still
runs on the same computer.

I am using VS2005 - Version 8.0.50727.42 and .NET version 2.0.50727.

Any help would be greatly appreciated.

Thanks,
Notis.

May 3 '06 #1
3 1693
OK, after some experimenting I found out that the problem is caused due
to a comon reference of System.Messaging. More specifically:

I have a solution with several projects. One of them is lets say my
application project. Another is a library project with several user
controls in it. Both projects reference System.Messaging.

My library project is referenced by the application project.

When I try to run the application project I get the previously
described exception. If I stop referencing the library project (or I
take out the reference to System.Messaging from the library project)
then the application project runs.
Of course this is only possible for experimentation as I need to
reference the library project in real life.

It seems that VS2005 doesn't like System.Messaging to be referenced
both by the library and by the application project. This used to be no
problem with VS2003.

Any ideas why this is happening and how to get around it?

Thanks,
Notis.

May 4 '06 #2
Are you using Windows XP x64 by any chance?

"notis" <no**********@gmail.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
OK, after some experimenting I found out that the problem is caused due
to a comon reference of System.Messaging. More specifically:

I have a solution with several projects. One of them is lets say my
application project. Another is a library project with several user
controls in it. Both projects reference System.Messaging.

My library project is referenced by the application project.

When I try to run the application project I get the previously
described exception. If I stop referencing the library project (or I
take out the reference to System.Messaging from the library project)
then the application project runs.
Of course this is only possible for experimentation as I need to
reference the library project in real life.

It seems that VS2005 doesn't like System.Messaging to be referenced
both by the library and by the application project. This used to be no
problem with VS2003.

Any ideas why this is happening and how to get around it?

Thanks,
Notis.

May 4 '06 #3
No, I am using Windows XP PRO on both machines that I have tested this.
N.

May 5 '06 #4

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

Similar topics

0
by: Andrew Gordon | last post by:
I'm investigating getting Microsoft Navision to do stuff from a Python script. The recommended way seems to be to use message queues (MSMQ). I can get Navision to send a message to itself fine. I...
0
by: Erich Hofacker | 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...
5
by: Alex Nitulescu | last post by:
Hi. I'm trying to make MSMQ work, so I go to Control Panel, Windows Components, I select MSMQ (Message Queuing Client Setup, actually) and about half-way through I get a nice message box saying ...
9
by: MrSpock | last post by:
1. Create a new Windows Application project. 2. Open the project properties and check "Make single instance application". 3. Build. 4. Go to the release folder and run the application. 5. Try to...
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...
1
by: notis | last post by:
Hi all, I am trying to port an application developed with VS2003 to VS2005. The project builds successfuly but when I run it, it throws a BadImageFormatException in the following line of code in...
13
by: Dave Booker | last post by:
I need to compile a VS2005 project to run using the 1.1 framework (i.e., app.config containing <supportedRuntime version="v1.1.4322" /> ). (If I just compile and run with such a setting it...
5
by: DBC User | last post by:
Hello, Is there an alternative approach to MSMQ for delivering messages? I am planning to develop an app which I don't want clients to install MSMQ (or do anything otherthan install my app). I...
1
by: Florence Tissot | last post by:
We are seeing some kind of resource leak in our performance lab running an ASP.NET (2.0) application that sends and receives messages from 2 public MSMQ queues. Here's a brief summary of what are...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.