[英]How 32 bit C# application can utilize a 64 bit DLL
I've got a C# Application that is 32-bit with a target x86 Installer. 我有一个32位的C#应用程序与目标x86安装程序。 This application can be installed an run on x64 machine no problem. 这个应用程序可以安装在x64机器上运行没问题。 However, a third party piece of hardware from a vendor (which is integrated into the software) now requires the use of a 64bit DLL whenever we install on x64 systems. 但是,当我们在x64系统上安装时,来自供应商的第三方硬件(集成到软件中)现在需要使用64位DLL。
Currently I have placed both the 32bit DLL and 64bit DLL in my project. 目前我已经在我的项目中放置了32位DLL和64位DLL。 However the target x86 Installer obviously doesn't like the 64bit DLL. 但是目标x86安装程序显然不喜欢64位DLL。
Is it possible for me to create a solution whereby I can deploy the 64bit DLL and/or 32bit DLL and still only have one installer project? 我是否可以创建一个解决方案,我可以部署64位DLL和/或32位DLL,但仍然只有一个安装程序项目? (I've looked at third party software called Advanced Installer but I do not know for sure if this will help me achieve the solution I need) (我查看了名为Advanced Installer的第三方软件,但我不确定这是否有助于我实现我需要的解决方案)
Or is it possible to create a generic Installer project? 或者是否可以创建一个通用的安装程序项目?
Note: Two installer (x86 vs x64) deployments aren't feasible because we have a process for automatic updates I do not want to redefine. 注意:两个安装程序(x86 vs x64)部署是不可行的,因为我们有一个自动更新的过程,我不想重新定义。 Maintaining one MSI file is important to me. 维护一个MSI文件对我很重要。
Advice is much appreciated. 建议非常感谢。
Installing the file from a x86 MSI is not a problem with Advanced Installer, the following article explains how to do it: http://www.advancedinstaller.com/user-guide/qa-OS-dependent-install.html 从高级安装程序安装文件从x86 MSI不是问题,以下文章解释了如何执行此操作: http : //www.advancedinstaller.com/user-guide/qa-OS-dependent-install.html
Also, if you have two versions of the DLL with the same name that need to be placed in the folder you should look here: http://www.advancedinstaller.com/user-guide/qa-install-file-with-same-name.html 此外,如果您有两个版本的DLL具有相同的名称,需要放在该文件夹中,您应该在这里查看: http : //www.advancedinstaller.com/user-guide/qa-install-file-with-same -name.html
However, you should first check if your application can correctly load the x64 DLL, as the guys mentioned in their comments. 但是,您应首先检查您的应用程序是否可以正确加载x64 DLL,正如他们在评论中提到的那样。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.