views:

188

answers:

2

Hello,
I have installation solution that have installer project (not web installer but simple installer) that installs NT services, web service and web sites with help of additional two projects of dlls with my own code that performs my installation step. In user actions of installer project I call installer function of one of those projects, and this project calls to installer of second project: installer -> MiddleCaller -> InstallationCore.

All this developing on Windows 7 and work fine when I compile all in 32 bit.

The project must run on Windows 2008. Because of some reasons all must be in x64 bit.
For this purpose, in MiddleCaller and InstallationCore I click right button of mouse on project -> build -> targer x64. For to move installer project to 64 bit in properties of installer (when project is active) I check: Target platform: x64.

When I run installation on x86 I get error:

The installation package is not supported by this processor type"

And this is good, because now I know that my installation compiled in 64 bit, but when I run this on windows 2008 I get:

Error 1001. Exception occured while initializing the instance:  
System.BadImageFormatException: could not load file or Assembly   
'MiddleCaller, v...' or one of its dependencies. An attempt was  
made to load a program with an incorrect format.  

Any one has some idea what I need to do for run fine the installation on x64?
May be I still not moved the installer project to x64 bit, if yes, where I do this?

Thank you for ahead.

A: 

There are some unclear things in this scenario. I understand that you are having difficulty running a 32-bit installer that calls on 64-bit assemblies. If this is correct, then what you are doing is not allowed. You cannot have 32-bit and 64-bit assemblies in the same process - that is illegal. If the 64-bit assemblies are being referenced by the installer directly, then the installer must also be 64-bit.

As clarification: I believe a 32-bit installer can install a 64-bit application, but it may only do so by copying the 64-bit files and not by actually making calls into the 64-bit files. The only way this is supported is if the 64-bit files are loaded into a different process and you use IPC to call into them, but even this is likely to be a bad solution.

In your case, I would encourage you to convert your installer into a 64-bit installer.

Jaxidian
All possible things in 64 bit. Also projects of application that being installed and also of installing application. I not sure I run 32 bit installer after I change the above property to x64 bit... If so do you know how to make the installer 64 bit?And yes, I still copy the dlls, I use Project Output only for two installation projects that are part of installation package.
rodnower
A: 

So, eventually, I compiled MiddleCaller and InstallationCore in AnyCpu mode, when all dll and executables that I need to install were compiled in x64 bit. All this I compiled on Windows 2008 x64 bit with x64 bit outer dependencies (like Oracle client).

rodnower