473,698 Members | 2,086 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VS2005 msmq BadImageFormatE xception

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
BadImageFormatE xception in the following line of code in the
constructor of my main form :

....
if
(!System.Messag ing.MessageQueu e.Exists(@".\Pr ivate$\CentralI nQueue"))
....

The exception window title is:
BadImageFormatE xception 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
1 1515
OK, after some experimenting I found out that the problem is caused due
to a comon reference of System.Messagin g. 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.Messagin g.

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

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

Similar topics

0
3704
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 found a couple of code example in an ancient message in this newsgroup. The send.py one I changed to the following: from win32com.client import gencache msmq = gencache.EnsureModule('{D7D6E071-DCCD-11D0-AA4B-0060970DEBAE}', 0, 1, 0) qi =...
0
413
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 redistribute a copy of the Microsoft.mshtml-DLL with our installation routine (just copy it into the application directory). Now the application works on most machines, but on a couple of machines I get a "BadImageFormatException" (details below). What...
5
11660
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 The MSMQ service cannot be started. Error code: 0x42C The Dependency service or group failed to start. If I acknowledge, the "installation" continues as if nothing happened, but in the end nothing has been installed.
9
5107
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 open a second instance of the application. This will cause an unhandled exception and the "Send Error Report" box shows up. Does this happen to anyone else, or is it just me? Debug info: "Unhandled exception at 0x00e149fd in...
4
4481
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 (database is SqlServer 2000). OS is WinXP SP2. When I run the project, it opens the MDI form (MdiMain.vb) fine, but when I open one of the child forms and try to select something in a combo box (cboFilter2) it stops on a line of the...
3
1708
by: notis.stamos | 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 the constructor of my main form : .... if (!System.Messaging.MessageQueue.Exists(@".\Private$\CentralInQueue"))
13
5054
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 functions, but I can't tell which framework it's using.) Is there any way to specifically compile for 1.1 with the standard Studio, or do I have to seek recourse with plug-ins like the following? ...
5
6377
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 was want to pass messages between two programs and my first approach was MSMQ and it worked perfectly and then I found out MSMQ is a seperate win component and is not installed by default. I am looking at writing files and implement...
1
4767
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 application does: 1. user provides input on a form on an aspx page and clicks continues 2. on postback, the page creates a c# .net object and calls a method on it to process the data provided by the user 3. the object in turns creates an...
0
9155
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8890
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8858
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6517
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5859
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2322
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.