views:

26

answers:

2

I'm trying to get a setup package to run.

If my application and it's setupproject is targeting x32 everything installs fine. But the application fails to load some COM+ components since they are 64bit. If I manually replace the application (after the setup have finished) with a 64bit version everything runs fine.

When I change my app and the setup project to target x64, the setup fails stating: "system.BadImageFormatException: Could not load file or assembly 'C:\xxxxxxx' or one of it's dependencies. An attempts was made to load an application of incorrect format."

How can I fix this problem?

+1  A: 

It sounds like your app is still begin built targeting x86. You can double-check with the Corflags.exe utility. Beware that the Target platform setting is separate for each configuration type. You might have changed it for the Debug configuration, so it runs on your dev machine, but not for the Release configuration, the one you're trying to deploy. Select the configuration first before changing the option. Build + Configuration manager.

Hans Passant
Can I extract the contents of a msi package to be able to check each packaged file?
jgauffin
Erm, just check the files that are being put in. The bin\Release folder of your project.
Hans Passant
None of them have the 32bit flag set.
jgauffin
A: 

Keeping the setup as 64bit but changing application target to "AnyCPU" worked.

jgauffin