gpt4 book ai didi

.net InstallUtil 实用程序 - 32 位与 64 位

转载 作者:行者123 更新时间:2023-12-03 14:51:47 25 4
gpt4 key购买 nike

我有一个编译为 AnyCPU 的 Windows 服务。我正在尝试将其放入我们的安装程序中进行分发。但是...我不清楚 32 位和 64 位版本的 InstallUtil 之间的区别。有谁知道有什么(如果有的话)?

在我的 64 位机器上,我可以运行 $(WinDir)\Microsoft.NET\Framework64\v2.0.50727 或 $(WinDir)\Microsoft.NET\Framework\v2.0.50727。

在这两种情况下,任务管理器中生成的服务进程都没有应用 *32 标志。

只有 32 位 InstallUtil 可以在 32 位机器上运行(显然)。

是否需要使用InstallUtil 的\Framework64\版本?它有什么不同?

最佳答案

根据 this ,您应该使用 64 位版本来安装 64 位和 MSIL 程序集,但它没有说明原因。

Starting with the .NET Framework version 2.0, the 32-bit version of the common language runtime (CLR) ships with only the 32-bit version of the Installer tool, but the 64-bit version of the CLR ships with both 32-bit and 64-bit versions of the Installer tool. When using the 64-bit CLR, use the 32-bit Installer tool to install 32-bit assemblies, and the 64-bit Installer tool to install 64-bit and Microsoft intermediate language (MSIL) assemblies. Both versions of the Installer tool behave the same.



我相信 here解释了原因。如果您查看帖子的底部,它会解释两者之间的一些差异以及何时使用 32 位 intallutil。

Installutil.exe is built for a specific platform, therefore it will start as a 32 or 64-bit process and the related registry hive will be updated. Note that if you have a snap-in built with the platform switch, you will only be able to register it in one of the hives (32-bit or 64-bit).

关于.net InstallUtil 实用程序 - 32 位与 64 位,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1650925/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com