ICE61:此产品应仅删除自身的旧版本

时间:2016-06-21 09:53:42

标签: wix windows-installer

我正在关注第二个答案here,以避免我的新安装包“已安装”消息。所以这是我改变的项目。一切都很好,我正在安装正确的新版本。

<Product Id="*" Name="Product Name" Language="1033" Version="1.9.0.0" Manufacturer="ABCD" UpgradeCode="e820aa3a-0288-45d8-a357-41bc065bbed0">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

    <MajorUpgrade AllowSameVersionUpgrades="yes" DowngradeErrorMessage="A newer version of [ProductName] is already installed." />

但是,编译器给出了以下警告消息:

  

ICE61:此产品应仅删除旧版本。该   最高版本不低于当前产品。 (1.9.0.0   1.9.0.0)

我不能忽略这条消息。那么问题是如何修复此警告?

3 个答案:

答案 0 :(得分:7)

警告来自AllowSameVersionUpgrades=Yes。正如你在评论中写的那样#34;我从不想在相同版本之间升级并且总是递增第二个(甚至第一个)&#34;,那么你不需要AllowSameVersionUpgrade,所以只需删除它。

答案 1 :(得分:2)

WiX允许您进行相同版本的安装,但微软并不推荐它,因此警告信息。

您可以按原样继续(并与编译器一起生活),或将您的MajorUpgrade部分更改为:

<MajorUpgrade
  AllowSameVersionUpgrades="no"
  DowngradeErrorMessage="A newer version of [ProductName] is already installed.  If you are sure you want to downgrade, remove the existing installation via the Control Panel" />

答案 2 :(得分:1)

您可以禁止这样的警告:

&"$($env:WIX)\bin\light.exe" -sice:ICE61 "installer\myproduct.wixobj"