VS 构建 - 32 位与 64 位

发布于 2024-09-06 05:01:55 字数 581 浏览 2 评论 0原文

ASP.NET 4.0:

我的笔记本电脑运行的是 64 位 Win7 Ultimate,使用 VS 2010 和 IIS7。

我的开发、登台和生产服务器都是带有 IIS6 的 32 位 2003 Server(显然)。

问题:

  1. 我知道这确实不受支持,但是有什么办法可以让 IIS6 在 Win7 下的笔记本电脑上运行吗?如果我的本地环境和部署管道之间的配置保持一致就好了,但我拒绝回到 XP。

  2. 如果我在 Win7 上的 VS2010 下编译,并在目标配置中设置了“任何 CPU”标志,生成的程序集是否与目标无关?也就是说,它们是特定于 64 位还是 32 位的,或者它们真的适用于其中任何一种吗? (由于各种不相关的原因,我常用的“尝试一下然后看看”的方法目前不起作用)。

  3. 在我的笔记本电脑上,我有 Framework 和 Framework64 文件夹。如果程序集与目标无关,那么它们与 VS 从我的代码生成的程序集有什么区别?如果它们不是与目标无关的,为什么我有两个单独的文件夹?这两个版本之间有性能差异吗?

提前致谢。

ASP.NET 4.0:

My laptop is running 64-bit Win7 Ultimate, using VS 2010 and IIS7.

My dev, staging and production servers are all 32-bit 2003 Server with IIS6 (obviously).

Questions:

  1. I know this is really unsupported, but is there any way I can get IIS6 to run on my laptop under Win7? It'd be nice to keep the configuration consistent between my local environment and the deployment pipeline, but I refuse to go back to XP.

  2. If I compile under VS2010 on Win7 with the "Any CPU" flag set in the target configuration, are the generated assemblies target-independent? That is, are they 64- or 32-bit specific, or will they really work on either one? (My usual method of "try it and see" is not working at the moment for a variety of unrelated reasons).

  3. On my laptop, I have both Framework and Framework64 folders. If the assemblies are target-agnostic, what's the difference between them and the assemblies that VS generates from my code? If they're not target-agnostic, why do I have two separate folders? Is there a performance difference between these two versions?

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

拔了角的鹿 2024-09-13 05:01:55
  1. 据我所知,没有办法运行与基于操作系统的版本不同的 IIS 版本。由于 IIS 与您所拥有的任何操作系统的安装相关(XP 和 Server 2003 中为 6.0、Vista 和 Server 2008 中为 7.0、Win7 和 Server 2008 R2 中为 7.5),因此您无法安装其他版本 - 您将需要 XP 或 2003 位置来测试是否要使用 IIS6。

  2. 它们与目标无关。 VS 实际上并不编译机器代码 - 它编译为 IL(一种“中间语言”),目标计算机(x64 或 x86,取决于安装的操作系统版本)上的 .NET 框架编译为机器代码本机工作。因此,针对“AnyCPU”进行编译将允许您在其中任何一个上运行。如果您愿意,您可以在编译时以 x86 为目标,它们将在您的 x86 服务器上本机运行并在您的 x64 计算机上使用 WoW,因此您实际上将在两者上运行完全相同的代码。

  3. 这仅意味着您安装了该框架的两个版本 - x64 和 x86。这些程序集与目标无关,但框架的相关版本将 .NET IL 程序集转换为在 PC 上本机执行的机器代码。为此,需要有一个 x86 框架来编译为 x86 机器代码(如果您有 x86 处理器),对于 x64 也是如此。

  1. There's no way, that I know, to run a different version of IIS than what's based on the OS. Since IIS is tied in to the installation of whatever OS you have (6.0 in XP and Server 2003, 7.0 in Vista and Server 2008, and 7.5 in Win7 and Server 2008 R2), you can't install a different version - you'll need an XP or 2003 location to test if you want to use IIS6.

  2. They're target-independent. VS doesn't actually compile machine code - it compiles to IL (an "intermediate language") that the .NET framework on the destination machine (either x64 or x86, depending on what version of the OS is installed) compiles into machine code that works natively. As such, compiling for "AnyCPU" will allow you to run on either. If you prefer, you can target x86 when you compile, and they'll run natively on your x86 servers and using WoW on your x64 machine, so you'll actually be running the exact same code on both.

  3. That just means you have both versions of the framework installed - x64 and x86. The assemblies are target-agnostic, but the relevant version of the framework converts the .NET IL assemblies into machine code that executes natively on the PC. To do that, there needs to be an x86 framework to compile to x86 machine code (if you have an x86 processor), and the same for x64.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文