473,386 Members | 1,712 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.

MC++ - System.IO.FileLoadException - Unverifiable image 'MyAssembly' can not be run.

I am getting the following error when one of my mixed-mode assemblies trys
to call a method in another. Both are strongly named, neither are in the
GAC. Execution is in a non-default AppDomain in case that matters.
MyAssembly is actually an exe rather than a dll. It is really just a
library but I use it's main entry point as a test of the library itself. So
there is an object in elementtest.dll who's source contains a statement:
#using <MyAssembly.exe>. Is that what is causing the problem? Must I make
the assembly have a dll extension to avoid this error for some reason?

A first chance exception of type 'System.IO.FileLoadException' occurred
in elementtest.dll

Additional information: Unverifiable image 'MyAssembly' can not be run.
Nov 17 '05 #1
2 2279
I remember reading somewhere that you can't use a .exe as a dll, even though the compilier allows it. So, yes, that is probally what is causing it. I just wish I could figure out where I read it to get more information.
Nov 17 '05 #2
I eliminated the main and changed it from an .exe to a .dll and, sure
enough, problem gone.

"mccoyn" <an*******@discussions.microsoft.com> wrote in message
news:15**********************************@microsof t.com...
I remember reading somewhere that you can't use a .exe as a dll, even

though the compilier allows it. So, yes, that is probally what is causing
it. I just wish I could figure out where I read it to get more information.
Nov 17 '05 #3

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

Similar topics

6
by: Ken Varn | last post by:
I am trying to remote debug a C# application but the debugger is reporting the following exception: An unhandled exception of type 'System.IO.FileLoadException' occurred in Unknown Module....
1
by: Fabian Aichele | last post by:
Hello! When trying to use Novell's C# LDAP library (from http://www.novell.com/coolsolutions/cooldev/features/a_net_cplus_ldap_library_cdev.html) the following exception occurs as soon as I try...
8
by: Ted Miller | last post by:
Hi folks, I'm looking at moving a large base of C++ code to .Net under tight time constraints. The code runs in mission-critical environments, and I am extremely concerned about the loader lock...
2
by: Robert W. | last post by:
I want to create a special DLL that will contain only images. My application will then load these images when it needs them. So I searched MSDN and found this article:...
0
by: allmanack | last post by:
Hello, Dotfuscator Community Edition says my .NET application written with MC++ is invalid(Unverifiable image). But I can't make image verifiable as it uses unmanaged code. Is it possible to...
1
by: John | last post by:
Hi, I tried to load a mixedmode dll (MC++) with AppDomain.Load(Byte ) in a C# Client. During the Load Process I got the following Exception: System.IO.FileLoadException: Ausnahme von...
0
by: Yueming | last post by:
Hello, I am using Visual Studio .NET 2003 (7.1) C++ on Windows XP. I created a project using Windows Service (.NET). I used all the default except my project name. After the project is...
2
by: Gujju | last post by:
Hi all, I m new to this class.. With System.Reflection... u can create run time objects for a specified class in a assembly... Now if once the Assembly is loaded in the memory then does...
1
by: Doug Handler | last post by:
I'm using VS2k5 and i've added a bunch of images to the project's resource.resx file and thus they reside in the Resources folder. I want to dynamically add an image to my project. I have no...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.