简体   繁体   English

x64计算机可以同时安装x86和x64 .net运行时吗?

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

can an x64 computer have both the x86 and x64 .net runtime installed? x64计算机可以同时安装x86和x64 .net运行时吗?

If so, how can I ensure that a program runs on the x64 runtime and not the x86 runtime? 如果是这样,我如何确保程序在x64运行时而不是x86运行时上运行?

Unless you tell it not to, VS should build an assembly that targets any CPU (ie. is platform agnostic). 除非你告诉它不要,VS应该构建一个针对任何CPU的程序集(即平台无关)。 The .NET runtime will run the x64 version if it can, otherwise it'll run x86. 如果可以,.NET运行时将运行x64版本,否则它将运行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. 我的理解是x86和x64版本都安装在x64机器上(查看%WINDIR%下的Microsoft.NET文件夹,你应该找到Framework和Framework64。

Cheers! 干杯!

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). x64 .NET框架同时安装x86 .NET框架,以便它可以运行32位强制二进制文件(假设它们仅在P / Invoke 32位二进制文​​件时被强制使用)。

Yes. 是。

BUT BEWARE ! 但是要小心 IIS 6.0, the version that ships with Windows Server 2003, can only run in one mode . IIS 6.0( Windows Server 2003附带的版本) 只能在一种模式下运行 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. 因此,如果您想在IIS 6中的同一IIS实例上混合使用32位和64位应用程序,那么就知道您将处于一个受伤的世界。但是,IIS 7(Windows Server 2008)不会遇到此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM