This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: BadImageFormatException
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 12, 2010
06:10 AM
BadImageFormatException
I have just installed InstallShield 2010. I have taken a working Project (ism) produced using InstallShield 12 and simply rebuild the CDImage using the new version. Apart from a couple of issues (other threads here) the build was successful. However when I install the created CDImage on a separate machine (which accepted the IS12 version no problem) the installation fails:
Error 1001. Exception occurred when initializing the installation. System.BadImageFormatException: The format of the file xxxxx.dll is invalid.
The file xxxx.dll (not its real name) is a piece of code declared to IS as a Custom Action. The code has not been changed in any way between IS12 and IS2010.
The installation then just rolls back and the installation is not made.
(The previous IS12 version was uninstalled prior to starting to install the new version)
Error 1001. Exception occurred when initializing the installation. System.BadImageFormatException: The format of the file xxxxx.dll is invalid.
The file xxxx.dll (not its real name) is a piece of code declared to IS as a Custom Action. The code has not been changed in any way between IS12 and IS2010.
The installation then just rolls back and the installation is not made.
(The previous IS12 version was uninstalled prior to starting to install the new version)
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 12, 2010
06:50 AM
I posted this as I found no matches for the BadImageFormat phrase. However after posting I did a search on the Error 1001 which is also part of the message. I found a post with a different underlying error, but the solution there also fixes my problem.
Go to the Component view of the code identified in the error message (xxxx.dll in my example)
Under .NET Settings the value of .NET Installer Class was set to Yes. Changing this value to "No" fixed the problem and my product now installs.
(As to why this "feature" is different between IS 12 and IS 2010 - as a poor user I can only speculate :confused:
Go to the Component view of the code identified in the error message (xxxx.dll in my example)
Under .NET Settings the value of .NET Installer Class was set to Yes. Changing this value to "No" fixed the problem and my product now installs.
(As to why this "feature" is different between IS 12 and IS 2010 - as a poor user I can only speculate :confused:
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 12, 2010
12:33 PM
Hi There,
BadImageFormatException is what you get when the .Net Framework attempts to load up an executable image (*.exe, *.dll, etc.) that doesn't match what it's expecting. I was going to write out cases I've seen, but Microsoft does a better job here:
http://msdn.microsoft.com/en-us/library/system.badimageformatexception.aspx
Basically, some caveats that are likely:
--Make sure the version of Installutillib.dll that's in your installshield settings matches what's being used to build the assembly.
--Make sure you didn't code anything strange into the install methods. Such as building the assembly on for x64 platform, but then trying to invoke 32 bit libraries or assemblies.
--Lastly, the sanity check. Make sure the file isn't corrupt.
Hopefully one of these will prove to be the problem when the .Net Assembly's installer class gets invoked during installation.
BadImageFormatException is what you get when the .Net Framework attempts to load up an executable image (*.exe, *.dll, etc.) that doesn't match what it's expecting. I was going to write out cases I've seen, but Microsoft does a better job here:
http://msdn.microsoft.com/en-us/library/system.badimageformatexception.aspx
Basically, some caveats that are likely:
--Make sure the version of Installutillib.dll that's in your installshield settings matches what's being used to build the assembly.
--Make sure you didn't code anything strange into the install methods. Such as building the assembly on for x64 platform, but then trying to invoke 32 bit libraries or assemblies.
--Lastly, the sanity check. Make sure the file isn't corrupt.
Hopefully one of these will prove to be the problem when the .Net Assembly's installer class gets invoked during installation.
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)