使用任何CPU的基于.NET组件构建的安装路径
使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此时,我建议安装到
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.