本文介绍了Visual Studio 安装项目更新或修补某些 dll 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Visual Studio 2010 项目 A 和一个安装项目 SetupProject.

I have a Visual studio 2010 project A and a setup project SetupProject.

我想要一个解决方案,通过更新多个 dll,即 a.dll(A 的主要输出)和 b.dll(A 依赖的其他一些 dll)来修补/升级一台机器上的安装.

I would like to have a solution of patching/upgrading the installation on one machine by updating several dll, namely a.dll (primary output of A) and b.dll (some other dlls that A depends on).

按照这个修补 使用 Orcamsimsp 的指南,我能够为我的安装程序创建补丁解决方案.

Following this patching guide using Orca and msimsp, I am able to create a patch solution for my installer.

问题是 msimsp 需要一个目标来与较新的安装程序进行比较,这意味着我必须特别说明这是一个从 1.0.1 到 1.0.2 的补丁"并且这个补丁要求当前安装的版本是 1.0.1.我不能用它来修补 1.0.0 安装.

The problem is msimsp needs a target for comparing with the newer installer, meaning I have to say specifically "this is a patch from 1.0.1 to 1.0.2" and this patch requires that the current installed version is 1.0.1. I cannot use that for patching a 1.0.0 installation.

换句话说,补丁必须依次应用,一个接一个.

In other words, the patches have to be applied in sequence, one after another.

我的问题是:

  1. 如何使用 Patch_101_To_102 将任何版本 1.0.x 升级到 1.0.2 安装,而无需通过 1.0.1 补丁?

  1. How can I use Patch_101_To_102 to upgrade any version 1.0.x to a 1.0.2 installation, without the need to go through 1.0.1 patch ?

除了这个补丁解决方案之外,你还建议其他解决方案吗?这个解决方案的问题在于它计算了两个版本之间的差异,所以我认为这就是为什么它需要按顺序应用补丁.有一个解决方案说只覆盖这些特定的 dll"会很棒

Would you suggest another solution other than this patching solution ? The problem with this solution is that it calculates the delta difference between two version, so I think that's why it requires the patches to be applied sequentially. It would be great to have a solution saying "overwrite these specific dlls only"

推荐答案

严格来说,Visual Stusio 仅支持 RemovePreviousVersions 升级,因此您所在职位的大多数人可能会选择另一种对修补有更多支持的工具.

Strictly speaking Visual Stusio suports only the RemovePreviousVersions upgrade, so most people in your position might choose another tool that has a bit more support for patching.

无论如何,你为什么要为 1.0.1 到 1.0.2 创建补丁?大多数人构建了一个累积补丁.只要您需要,只要保留 1.0.0 版本,并针对不断积累修复程序的 MSI 构建您的所有补丁程序.你增加你的 MSI 版本,创建一个新的补丁 guid,并在 PCP 文件中说这个新补丁取代了以前的,在 ListOfPatchGUIDsToReplace 中.

Anyway, why are you creating a patch for 1.0.1 to 1.0.2? Most people build an accumulating patch. Just keep the 1.0.0 build around for as long as you need it, and build all your patches against an MSI that keeps accumulating fixes. Youd increment your MSI version, create a new patch guid, and in the PCP file say that this new patch superseded the previous ones, in ListOfPatchGUIDsToReplace.

这篇关于Visual Studio 安装项目更新或修补某些 dll 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 15:35
查看更多