Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2004

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bern McCarty - 13 May 2004 14:44 GMT
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.
mccoyn - 13 May 2004 15:36 GMT
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.
Bern McCarty - 13 May 2004 17:22 GMT
I eliminated the main and changed it from an .exe to a .dll and, sure
enough, problem gone.

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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.