Compiling for 32 and 64 bit resditributables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have a .NET application that I have to deploy on both 32 bit and 64 bit
environments. Can someone help on how you configure the solution
porgramatically with the use of precompilation directives without the need to
manually change them for each environment?.

Thanks,
Ganesh
 
Ganesh

As I understand it you do not need to do anything. The standard "Any CPU" as
target is just that - the Jitter on the target is what matters and it will
automatically generate code 32bit or 64bit according to its host.

Selecting 64 bit target should only be used when you specifically want a
particular CPU and do not want 32bit.

Terry Bourne
 
There are two things here to think about:

If you build with the "Any CPU" tag, your C#/VB code will just work. It's
great....

... the problem is deployment. MSI files / Deployment projects need to be
targeted at one platform. This means if you want x86/x64 deployment, you
compile your DLL's once, then build two deployment projects. This pattern
also holds true for Merge Modules and such.
 
Back
Top