我正在尝试配置我的Wix Toolkit安装程序来处理我的Visual Studio应用程序的升级.
<?xml version="1.0" encoding="UTF-8"?>
<?define ProductVersion = "5.0.0.115"?>
<?define ProductUpgradeCode = "9880b0b8-b3b1-4fa6-b65e-d4ecff430248"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Id="*" Name="My Software" Language="1033" Version="$(var.ProductVersion)" Manufacturer="My Company" UpgradeCode="$(var.ProductUpgradeCode)">
<Package Id="*" InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Comments="My Software version 5 installer" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />
Run Code Online (Sandbox Code Playgroud)
问题是使用MajorUpgrade实际上没有检测到.115.因此,例如安装了版本5.0.0.110,然后运行5.0.0.115安装程序,在添加/删除程序中它将列出5.0.0.110和5.0.0.115.如果我将版本更改为5.0.115.0一切正常.
这是程序应该如何工作或这是一个错误?
不是WiX的问题.
这是Windows Installer中的设计.Windows Installer只会查看:
major.minor.build
Run Code Online (Sandbox Code Playgroud)
任何第四个字段都会被忽略.有关详细信息,请参阅ProductVersion属性文档.