Click here to Skip to main content
15,902,447 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have created a 32-bit setup for my application and installed in my computer.Now I want to check it with 64-bit version executable. So if I replace only the 32-bit executable in Program Files (x86) with 64-bit executable files. Will my application run ? Currently I am developing application using Visual Studio 2008.
Posted

This is very sloppy, but yes, it should run, but only in your 64-bit target is the same as your system and CPU instruction-set architecture. You probably miss the fact that, among VS target architectures, there are two incompatible 64-bit architectures: x86-64 (aka "AMD64") and IE64 ("Itanium"). The first one is more popular.

All platforms will be compatible with x86 (32-bit), which will be run under WoW64 on 64-bit systems.

Maybe your real problem is: why your product is not done all for "Any CPU"? This is the best option. .NET Assemblies are JIT-compiled, which allows you to make one set of assemblies for all platforms.

As to the installation target, the only difference is: 32-bit product will be installed on "Program Files (x86)" instead of "Program Files". It won't make any problems if you assemblies are actually "Any CPU" or even targeted 64-bit, only… this is abominate. I would say, Windows Installer itself is badly obsolete in comparison with .NET. It's a real lame that "Any CPU" installation does not exist. (Please, if someone knows that my information is outdated, please write a comment or another solution to correct me.)

Situation will be a bit more complicated if you mix Any CPU with one of the "real" hardware target architecture and also with unmanaged modules, but the effect of it is easy to analyze understanding the principles.

[EDIT]

First of all, you need to critically review the need for the installation. Consider using no installation at all. Do you modify system registry? change firewall settings? register file types? If not, you don't need installation. In modern jargon, it's called "portable" option. You can right software (even if it is not "Any CPU") which runs in any location correctly. Finally, Microsoft started to encourage this style, this way coming close to common sense and more rational thinking.

—SA
 
Share this answer
 
v3
Comments
joje1985 6-Mar-15 0:22am    
Thnx SA and BacchusBeale
Sergey Alexandrovich Kryukov 6-Mar-15 0:43am    
Sure. Will you accept the answer formally?
—SA
32 bit and 64 bit need to be installed with different target configurations.
If the install wizard is set as 'Any CPU', from my experience, it is incorrectly installed on x64 PCs. Thus need 2 setup projects, one for x86 and other for x64.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 6-Mar-15 0:01am    
You are right about "Any CPU", but only partially. In a way, it is "incorrectly installed", but, nevertheless, it will perfectly work. My recommendation is using 64-bit installation option for all 64-bit platforms with all 3 target architecture except x64 (32-bit).

As to "need to be installed with different target configurations", this is very misleading. It would be good to do so, but functionally not important. In other words, inquirer's "trick" will work. Please see my answer.

—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900