Search code examples
.net32bit-64bitsetup-deployment

x86 setup for a x64 windows service


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?


Solution

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