cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
grparsec
Level 7

Exception occurred while initializing the installation

I have just upgraded from Installshield 2008 to 2009.
When I build my Basic MSI project in IS 2008, it work fine but when I build it in IS2009 and run it, I get the following error:

Error 1001 exception occurred while initializing the installation.
System.BadImageFormatException: The format of file is invalid file 'MyService.exe' is invalid...


Any ideas why?

Thanks.

PS: MyService is a .Net Application file.
PS2: I installed IS2009 on a Win Server 2003 and buit my setup and ran it...with no problem. The above problem occurres when I build the setup with IS2009 on XP.
Labels (1)
0 Kudos
(3) Replies
Mike_Marino
Level 6 Flexeran
Level 6 Flexeran

Does your application require a certain version of .Net to be installed?
0 Kudos
Not applicable

This issue most often occurs when a .NET assembly is loaded with the wrong version of .NET. Generally speaking, it happens when a .NET 2.0 assembly is loaded using the .NET 1.1 runtime.

The easiest way to check this is to go to Tools -> Options -> .NET and then change the location of Regasm.exe and InstallUtilLib.dll to point to the correct version of the .NET Runtime.
0 Kudos
grparsec
Level 7

Thanks a lot, that was it. I had to pick the right version of InstallUtilLib.dll.
0 Kudos