64-bit Managed Custom Actions with Visual Studio  64-bit Managed
Custom Actions with Visual Studio    • Comments 19  A reader who
happened across my post on Windows Installer on 64-bit Platforms
mentioned a problem with running 64-bit managed custom actions
using the Visual Studio 2005 Windows Installer project. This
also recently cropped up in an internal discussion alias.  The
issue is that if you build a managed class library project
targeting a 64-bit platform using /platform:x64 or
/platform:Itanium and install a Windows Installer package built
in Visual Studio 2005 on a 64-bit machine a
System.BadImageFormatException is thrown. The reason is because
the native shim packaged with the .msi file is a 32-bit
executable.  Let's step back a minute, though, to how to build a
Windows Installer setup project with managed custom actions. I
won't go into details, but basically you create a new Class
Library project that contains one or more derivatives from the
System.Configuration.Install.Installer class. In the