An update to my original post to say that I reproduced my error by creating
a small solution with a .NET 4 code project and a .NET 4 CA project, and I
built it on a 32-bit build server with WIX 3.5.2110. The error seems to say
that the installer was built via a newer runtime than is available at
installation time, and it's true that the build PC is different than the PCs
where I try to install. But I have tried installing on a PC with VS 2010 and
.NET 4, so I don't see how my installation PC can be at an earlier runtime
than the build PC. Unless msiexec is doing something funny with the runtime.
Any help would be appreciated.

-----Original Message-----
From: Gary Gocek [mailto:g...@gocek.org] 
Sent: Thursday, September 23, 2010 7:26 PM
To: 'wix-users@lists.sourceforge.net'
Subject: BadImageFormatException, Microsoft.Deployment.WindowsInstaller


I'm building a project on Win 2008 Server 64-bit, using TFS 2010 build
services and Visual Studio 2010. All projects in the solution are for VS
2010 and .NET Framework 4 (recently converted from VS 2008 and .NET 3.5).
The projects are set for "Any CPU" (so the Platform property in the .csproj
files is 'x86'). WiX 3.5.2110 is installed. The solution builds and
candle/light run to create the MSI.

But when I try to run the MSI, it fails and I see an error in the MSI log
referring to Microsoft.Deployment.WindowsInstaller. I have tried installing
in 32-bit and 64-bit environments, always with msiexec 4.5 (5.0 under Win
7), and .NET 4 is installed and up to date.

Any suggestions? Thanks, here's the error:

System.BadImageFormatException: Could not load file or assembly
'XyzInstaller' or one of its dependencies. This assembly is built by a
runtime newer than the currently loaded runtime and cannot be loaded. File
name: 'XyzInstaller'
   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&
stackMark, Boolean throwOnFileNotFound, Boolean
forIntrospection)
   at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&
stackMark, Boolean throwOnFileNotFound, Boolean
forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection)
   at System.Reflection.Assembly.InternalLoad(String assemblyString,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection)
   at System.AppDomain.Load(String assemblyString)
   at
Microsoft.Deployment.WindowsInstaller.CustomActionProxy.GetCustomActionM
ethod(Session session, String assemblyName, String className, String
methodName)



------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to