如何确保我的 MSI 安装了降级的库? [英] How can I make sure a downgraded library is installed by my MSI?

查看:26
本文介绍了如何确保我的 MSI 安装了降级的库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用于设置我的应用程序的 MSI.它只有一个组件并且只安装到 %PROGRAMFILES%(没有共享的二进制文件).简化,看起来像这样

I have an MSI that setups my application. It has a single component and installs only to %PROGRAMFILES% (no shared binaries). Simplified, it looks like this

Msi file, Monday build:
    Program.exe  (v1.0.0)
    ThirdPartyLibrary.dll  (v2.0.1)

现在,如果我发现由于我将 ThirdPartyLibrary dll 从 v2.0.0 升级到 v2.0.1 而导致程序中的错误,从而将引用恢复到 v2.0.0,似乎我的 MSI 不会自动替换安装目录下的文件?

Now, if I discover a bug in the program caused by my upgrade of the ThirdPartyLibrary dll from v2.0.0 to v2.0.1, and thus revert the reference to v2.0.0, it seems my MSI doesn't automatically replace the file in the installation directory?

Msi file, Tuesday build:
    Program.exe  (v1.0.0)
    ThirdPartyLibrary.dll  (v2.0)  <- downgraded

确保程序文件夹始终包含我的设置中的二进制文件的最佳实践是什么?我应该 a) 在复制新文件之前擦除安装目录中的所有内容吗?是否有一个选项(在 Wix 中)我可以使用使 msi 强制覆盖所有文件,而不管版本如何?

What is the best practice here to ensure that the program folder always contains exactly the binaries in my setup? Should I a) wipe everything from the setup directory before copying the new files? Is there an option (in Wix) I can use that makes the msi force an overwrite of all files regardless of version?

如果我从安装程序中删除一个文件(如果在运行时存在会导致错误的文件),那么在安装程序后获得工作程序的唯一方法是先删除所有文件?

What if I remove a file from the setup (a file that would cause errors if present at runtime), then the only way to have a working program after the setup, would be if it deleted all files first?

推荐答案

您可以使用 msi 技巧.在 msi 数据库的 File 表中,编辑 Version 列并输入更高的版本,例如 3.0.这样您就可以利用文件版本控制规则.

You can use a msi trick. In the File table in the msi database edit the Version column and enter a higher version, 3.0 for example. This way you will take advantage of the file versioning rules.

这篇关于如何确保我的 MSI 安装了降级的库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆