InstallExecuteSequence表包含在两个不同位置声明的操作“RemoveExistingProducts”

时间:2014-08-25 11:38:10

标签: .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.

为什么会这样?以及如何解决它?

1 个答案:

答案 0 :(得分:4)

您应该尝试删除此行:

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

并将 Schedule =“afterInstallExecute”添加到MajorUpgrade Element,如下所示:

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