本文介绍了“降级"MS dll 在升级时消失 - Windows Installer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们开发了一个通过 Windows Installer 分发的应用程序,使用 WiX 创建,我们的客户可以在其中从任何旧版本升级到最新版本.

We have developed an application that is distributed through Windows Installer, created with the use of WiX, where our customers can upgrade from any older version to the newest.

然而,我们的最新版本删除了 2 个 dll,这只能通过重新安装来解决.

Our latest version however, deletes 2 dll's, and this is only rectified through a reinstall.

Microsoft.IdentityModel.Protocol.Extensions 已从 Nuget 版本 1.0.2.206221351 和文件版本 1.0.20622.1351到 Nuget 版本 1.0.4.403061554 和文件版本 1.0.4.54.

Microsoft.IdentityModel.Protocol.Extensions was upgraded from Nuget Version 1.0.2.206221351 and File version 1.0.20622.1351 to Nuget version 1.0.4.403061554 and File version 1.0.4.54.

类似的变化发生在 System.IdentityModel.Tokens.JwtNuget 版本 4.0.2.206221351Nuget 版本 4.0.4.403061554.

Similar changes happened to file versioning of System.IdentityModel.Tokens.Jwt from Nuget version 4.0.2.206221351 to Nuget version 4.0.4.403061554.

因此,通过更改文件版本的计算方式,MS 有效地将版本更改为先前版本的降级(在构建版本上从 20622 降为 4).

So by changing how the File version was calculated, MS effectively changed the version to a downgrade of the previous (from 20622 to 4 on the build version).

有人称其为错误,有人称其为功能,但结果是,MSI 有一个步骤,它记录所有需要升级的文件,然后卸载当前版本,然后仅安装未更改或更改版本的文件 - 任何降级都被排除在外.

Some call it a bug, and some call it a feature, but what happens, is that the MSI has a step where it records all the files that needs to be upgraded, it then uninstalls the current version, and then only installs the files that was unchanged or bumped in version - any downgrades are left out.

我们将此产品运送给许多不同的客户,他们的技术技能各不相同,因此升级效果更好,否则我们将面临大量支持问题.有什么我可以改变的,而无需实际禁用 MSI 发生错误时回滚的功能,我认为这是解决相同问题的其他人的一种权衡.

We are shipping this product to a lot of different customers, with very varied technical skills, so an upgrade better work, or we will be flooded with support issues. Are there anything I can change, without actually disabling features like the ability for the MSI to rollback in case of errors, which I have seen as a trade off for others solving the same issue.

推荐答案

您有几个选择.一种是更改您安排 RemoveExistingProducts 的位置.另一种方法是使用 REINSTALLMODE=AMUS 而不是默认的 OMUS.另一种方法是在有问题的 DLL 上做版本,以便它们总是被重新安装.(创作文件元素,使版本为 65535.0.0.0 或类似的版本.)

You have a few options. One is to change where you schedule RemoveExistingProducts. Another is to use REINSTALLMODE=AMUS instead of the default OMUS. Another is to do version lying on the offending DLLs so that they always get reinstalled. (Author the file element so the version is 65535.0.0.0 or something like that.)

这是一个 MSI 功能...错误在于 Nuget 发布了一个版本较低的较新 DLL #.这违反了 MSI 的组件规则和默认文件版本控制规则.

It's an MSI feature... the bug is in Nuget releasing a newer DLL with a lower version #. That breaks MSI's component rules and default file versioning rules.

这篇关于“降级"MS dll 在升级时消失 - Windows Installer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 23:51