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 / .NET Framework / New Users / January 2007

Tip: Looking for answers? Try searching our database.

InstallUtil fails to install service; throws BadImageFormatException

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Keith - 22 Jan 2007 20:56 GMT
Hello,

I'm trying to use InstallUtil to install a Windows Service, but it keeps
failing with a BadImageFormatException.  I don't understand what it wrong
with it; all the code has been generated by Visual Studio.  I started a new
Windows Service C# project, added an installer in the designer, and built it
without errors.  But when I tried to install it with InstallUtil, it fails.

Am I missing an override or not implementing something else that is
required?  None of the tutorials that use InstallUtil to register their
service mention anything about that...

Any help is appreciated!

Keith
Phil Wilson - 22 Jan 2007 21:09 GMT
I bet you're using a 1.1 InstallUtility to install a 2.0 assembly, something
like that. BadImageFormatException is what you get when a 1.1 assembly tries
to load a 2.0 assembly.
Signature

Phil Wilson
[Microsoft MVP - Windows Installer]

> Hello,
>
[quoted text clipped - 12 lines]
>
> Keith
Keith - 22 Jan 2007 23:08 GMT
>I bet you're using a 1.1 InstallUtility to install a 2.0 assembly,
>something like that. BadImageFormatException is what you get when a 1.1
>assembly tries to load a 2.0 assembly.

Ha!

You are the winner, Phil.  I just noticed the version string that gets
printed out to the console.  I guess I'll need to cleanup/reorder my paths
so I don't keep getting 1.1 utils when I want 2.0 ones.

Thanks.

Keith

Rate this thread:







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.