使用任何CPU的基于.NET组件构建的安装路径

发布于 2025-01-17 16:14:53 字数 162 浏览 3 评论 0原文

使用 AnyCPU 构建的 .Net 程序集在加载到基于 CPU 的 64 位或 32 位进程时将 JIT 为 64 位代码。我正在创建一个 WiX 安装程序。 使用 AnyCPU 选项构建的组件的默认路径(程序文件 x86/程序文件)应该是什么?安装程序是否应检查平台并设置适当的路径或是否有其他方法来处理?

.Net Assemblies built with AnyCPU will JIT to 64-bit code when loaded into a 64-bit or 32-bit process based on the CPU. I am creating a WiX installer.
What should be the default path (Program File x86/Program File) for the components built with AnyCPU option? Shall the installer check the platform and set the appropriate path or are there any other ways to handle it?

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

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

发布评论

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

评论(1

明月夜 2025-01-24 16:14:53

此时,我建议安装到 ProgramFilesFolder(程序文件 (x86)),因为 32 位和 64 位计算机上都存在该文件夹。 32 位是(目前)Windows 最接近“任何 CPU”的。

注意:随着 WOW 从 64 位 Windows 中删除,这确实会发生变化。您已经可以从 Windows Server 中删除 WOW 子系统,在这种情况下,您需要提供一个针对适当体系结构的包。目前尚不清楚 WOW 是否/何时会从 Windows 客户端中删除。

At this point in time, I'd recommend installing to ProgramFilesFolder (Program files (x86)) as that is present on both 32-bit and 64-bit computers. 32-bit is the closest thing (at this time) Windows has for "Any CPU".

Note: This does change as WOW is removed from 64-bit Windows. You can already remove the WOW subsystem from Windows Server, in which case you need to provide a package that targets the appropriate architecture. It isn't clear if/when WOW will be removed from Windows client.

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