Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
sir i try to create set to run both platform but when i run my set up in x64 then one error message show .....

Plz help me..
Posted

1 solution

In the simplest case, you don't need to do anything special for that. Make sure all assemblies are built for the target "Any CPU". As .NET is JIT-compiled system, the assembly modules for all instruction-set architectures will be identical. In this case, the native code executing when you run the application will be defined during run-time automatically, depending on the instruction-set architecture of the machine. Please see:
http://en.wikipedia.org/wiki/Instruction_set_architecture[^],
http://en.wikipedia.org/wiki/Just-in-time_compilation[^].

The situation can become way more complex if one or more of the assemblies uses some native code compiled for certain particular instruction-set architecture. Then the target CPU architecture should match this code. First thing to understand is: you cannot mix different instruction-set architectures in one process. Worse, it will compile but crash during run time.

Also, you can use the following principle: if all assemblies are compiled as "Any CPU", and only the entry-point assembly (the one loaded when you start application) has certain (non-"any") target, it will define the instruction-set architecture of the whole process. You can use it as the method of implementation different version for different machines.

I don't want to overview all possible combination of target instruction-set architectures. You should use general principles. I'll just describe two typical cases.

First, if you can use 32-bit target, you can use it on any machine. The 32-bit CPU is compatible with both 64-bit instruction-set architectures, but two 64-bit ones are not compatible with each other. So, 32 bit is the most universal variant, it your unmanaged parts are all 32-bit, of course. And of course all "Any CPU" is even more universal case, but then again, it would work only if you don't use unmanaged code, or you can have versions of all unmanaged modules for every case and deploy appropriate version during installation.

The variant I just mentioned is another one. Imagine, you have a version of unmanaged code of all instruction-set architectures. Then you should install appropriate modules and use universal CLI code.

—SA
 
Share this answer
 
Comments
AmitGajjar 18-Aug-12 2:01am    
Ofcourse 5+
Sergey Alexandrovich Kryukov 18-Aug-12 2:03am    
Thank you again, Amit.
--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