.net - InstallExecuteSequence 表包含在两个不同位置声明的操作 'RemoveExistingProducts'

标签 .net wix upgrade

遵循 http://blogs.msdn.com/b/astebner/archive/2008/10/19/9006538.aspx 的建议为了在 WiX 升级期间保留配置文件,我在 InstallExecuteSequence 中添加了以下行:

<RemoveExistingProducts After="InstallFiles"></RemoveExistingProducts>

编译 WiX 解决方案时弹出以下错误:

The InstallExecuteSequence table contains an action 'RemoveExistingProducts' that is declared in two different locations.  Please remove one of the actions or set the Overridable='yes' attribute on one of their elements.

为什么会出现这种情况?以及如何解决?

最佳答案

你应该尝试删除这一行:

<RemoveExistingProducts After="InstallFiles"></RemoveExistingProducts> 

并将 Schedule="afterInstallExecute" 添加到 MajorUpgrade Element像这样:

<MajorUpgrade Schedule="afterInstallExecute" 
              DowngradeErrorMessage="Newer version installed. Exiting." />

关于.net - InstallExecuteSequence 表包含在两个不同位置声明的操作 'RemoveExistingProducts',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25485061/

相关文章:

python - 将 python 2.7.7 更新到 2.7.9 - 安全吗?

git - 如何升级 Windows 中 git svn 使用的 SVN 版本?

c# - 创建一个由 x 到 y 范围内的值填充的数组

c# - 如何测试给定的功能代码单元 (C#) 是否不创建/写入任何文件到磁盘?

.net - 在 Delphi 中通过 COM 对象使用 .Net 类有时会挂起

c++ - WIX C++ 自定义操作

c# - 打破 Liskov 替换原则的类使用陷阱

wix - 你怎么能_创建_一个Wix中的文本文件?

从 Visual Studio 2010 构建时缺少 Wix darice.cub 文件

mongodb - 在 Ubuntu 20.04 上升级 MongoDB 版本