简体   繁体   English

如何使用ClickOnce部署多个版本的第三方DLL?

[英]How to deploy multiple versions of a 3rd party DLL with ClickOnce?

For our applications we need to support two versions of a 3rd party application. 对于我们的应用程序,我们需要支持两个版本的第三方应用程序。 The vendor offers DLLs - one for each version - to do so. 供应商提供DLL(每个版本一个)来执行此操作。

I used this SO answer to make it work for the MSI version of our application. 我使用这个SO答案使其适用于我们的应用程序的MSI版本。 The ClickOnce configuration, however, seems to be impossible. 但是,ClickOnce配置似乎是不可能的。 It looks like ClickOnce doesn't care about folders and just adds the two DLLs to the manifest (different version in the assemblyidentity and different hash values). 看起来ClickOnce不关心文件夹,只是将两个DLL添加到清单(assemblyidentity中的不同版本和不同的哈希值)。 After the download is completed the application isn't starting, because the identity of one DLL cannot be verified. 下载完成后,应用程序无法启动,因为无法验证一个DLL的标识。

I am assuming that the two versions cannot be distinguished an therefore the wrong hash value is used for the check. 我假设无法区分这两个版本,因此使用错误的哈希值进行检查。

What I did now is the following. 我现在做的是以下内容。 I get the (ClickOnce-) folder of my program at start-up and then simply copy and rename the DLL to the new folder. 我在启动时获得程序的(ClickOnce-) 文件夹,然后只需将DLL复制并重命名为新文件夹。 This works for my workstation. 这适用于我的工作站。 Not sure yet if it works on terminalserver systems. 还不确定它是否适用于终端服务器系统。 However, it should as the ClickOnce stuff is happening in the users directory AFAIKS. 但是,它应该在用户目录AFAIKS中发生ClickOnce。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM