Question

I am trying to create an MSI package using the WIX Toolset 3.8.

I followed this tutorial and everything here works fine. When I try to run my Hello World Program I get the following error:

"The version of this file is not compatible with the version of Windows you're running. Check you computer system information to see whether you need an x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher."

Looking at my Build settings For My Hello World App, Platform target is set to Any CPU.

Any Ideas?

Was it helpful?

Solution 2

In the video they set the source for both the EXE and the DLL to the TargetPath of the project. According to the Project Reference and Variables section of the wix documentation, this would be the path of the EXE. In this case the EXE was copied, then the DLL was copied with the same name, thus overwriting the EXE.

Setting the correct source, TargetDir, for the DLL fixed the problem.

OTHER TIPS

Take a look at this MSDN article. The "TL; dr." of it is -- don't pick "Any CPU" for your platform target. Most of the time, you want x86.

As a side note, WIX isn't actually related to this problem at all. It's just delivering the exe to the filesystem, and doesn't have anything to do with the execution of the payload.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top