32-bit to 64-bit

  • Thread starter Thread starter Marco Shaw [MVP]
  • Start date Start date
M

Marco Shaw [MVP]

**I'm not a professional developer.**

Say I have a app orginally compiled on a 32-bit system, and want to run
it on a 64-bit system. I could just copy that app over, and let wow64
emulation do all the work, but what might be involved in re-doing the
app as 64-bit?

I understand the .NET Framework version no longer comes in 64-bit itself?

This is a .NET 1.1 app. I just want to determine if I can just
recompile it and have it work "better"?

Marco

--
*Microsoft MVP - Windows PowerShell
https://mvp.support.microsoft.com/profile/Marco.Shaw
*Co-Author - Sams Windows PowerShell Unleashed 2nd Edition
*PowerShell Co-Community Director - http://www.powershellcommunity.org
*Blog - http://marcoshaw.blogspot.com
 
Marco said:
Say I have a app orginally compiled on a 32-bit system, and want to run
it on a 64-bit system. I could just copy that app over, and let wow64
emulation do all the work, but what might be involved in re-doing the
app as 64-bit?
Probably nothing, it's likely already 64-bit. See below.
I understand the .NET Framework version no longer comes in 64-bit itself?
Sure it does, but the majority of .NET code is bytecode, which is
platform-agnostic. On a 64-bit machine only the 64-bit framework is
required, which also contains the 32-bit parts where needed.
This is a .NET 1.1 app. I just want to determine if I can just
recompile it and have it work "better"?
Actually, it should be enough to do *nothing*. .NET applications run as
64-bit on 64-bit systems and 32-bit on 32-bit systems. You can specify an
explicit platform when compiling, but this is generally only needed when
interfacing with COM components which only come in one specific flavor.

You can even retarget .NET executables without recompiling them at all,
using the corflags.exe utility.
 
Marco Shaw said:
**I'm not a professional developer.**

Say I have a app orginally compiled on a 32-bit system, and want to run it
on a 64-bit system. I could just copy that app over, and let wow64
emulation do all the work, but what might be involved in re-doing the app
as 64-bit?

I understand the .NET Framework version no longer comes in 64-bit itself?

This is a .NET 1.1 app. I just want to determine if I can just recompile
it and have it work "better"?

Hi Marco!

V1.1 of the .NET Framework was only 32bit. V2.0 and up is both 32 bit and
64 bit and they are not going to drop support for 64 bit (or 32 bit).

If you rebuild your app with V2.0 (or higher) of the .NET Framework, you
should probably target "Any CPU" which will produce an app that runs as
either 32 bit or 64 bit. You could create two versions, one that targets
x86 and on for x64 but it probably won't be of much benefit.

If you start using an x64 system, the first thing that you'll notice is that
you have two versions of PowerShell, 32 bit and 64 bit. If you build a
snap-in that targets any CPU, you can make the snap-in registry entries for
both 32 and 64 bit PowerShell point to the same dll and it will work just
fine.

For most applications, you won't see a difference recompiling from V1.1 to
V2.0. It depends on what the app is actually doing.

John Vottero
MVP Systems, Inc.
 
Back
Top