tags:

views:

719

answers:

3

can an x64 computer have both the x86 and x64 .net runtime installed?

If so, how can I ensure that a program runs on the x64 runtime and not the x86 runtime?

+2  A: 

Unless you tell it not to, VS should build an assembly that targets any CPU (ie. is platform agnostic). The .NET runtime will run the x64 version if it can, otherwise it'll run x86.

My understanding is that both x86 and x64 versions are installed on x64 machines (check out the Microsoft.NET folder under %WINDIR%, you should find both Framework and Framework64.

Cheers!

OJ
+3  A: 

Yes. The x64 .NET framework installs the x86 .NET framework at the same time so that it can run 32 bit forced binaries (which are supposed to be forced only if they P/Invoke 32 bit binaries).

Joshua
+2  A: 

Yes.

BUT BEWARE! IIS 6.0, the version that ships with Windows Server 2003, can only run in one mode. So know that you'll be in a world of hurt if you want to mix 32-bit and 64-bit apps on the same IIS instance in IIS 6. IIS 7 (Windows Server 2008) does not suffer from this problem, though.

Dave Markle
Yep. IIS7 doesn't suffer from this.
Mauricio Scheffer
Yeah, I thought as much, considering how well they'd modularized IIS7 compared to previous versions. Makes a lot of sense. Thanks!
Dave Markle