Can I run a VB.Net app on a 64bit Windows?

The answer is "Not yet, but Yes".

Actually since the code that VB.Net produces is not the actual machine code (that is left to JIT compiler), the code can run on any platform provided that a corresponding runtime support is present. Whidbey release does provide this for supported 64bit platforms! If you have a chance to try Whidbey Beta1 release on a 64bit, you may find that it can run .Net apps in 64bit mode. Actually 32bit runtime is also installed and an application can be forced to run as a 32bit app. I will explain why and how you can do this later.

Now try to run this on a 64bit OS with Whidbey Beta1 installed:

Module Module1

Sub Main()

'the size of IntPtr must match the

'platforms's pointer size

'IntPtr is 4 bytes on 32bit platform

If IntPtr.Size = 4 Then

Console.WriteLine("32 bit process")

End If

'IntPtr is 8 bytes on 64bit platform

If IntPtr.Size = 8 Then

Console.WriteLine("64 bit process")

End If

End Sub

End Module

 

==== result:

64 bit process