我正在尝试将upgrade
功能添加到我的wix installer code
这是我的产品部分
<?define UpgradeCode = "{8C197FE6-57DF-41FD-A0CD-84B5123123CR}" ?>
<Product Id="*"
Name="!(loc.ProductName_$(var.Platform))"
Language="!(loc.Language)"
Version="$(var.BuildVersion)"
Manufacturer="!(loc.Company)"
UpgradeCode="$(var.UpgradeCode)">
我在MjaorUpgrade
中有Product.wxs
以下代码
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeErrorMessage)"
AllowDowngrades="no"
AllowSameVersionUpgrades="yes"
RemoveFeatures="ALL"
Schedule="afterInstallInitialize"/>
但是,当我运行MSI
时,它不会删除旧文件并进行全新安装吗?否则它将覆盖文件。
我有filter.xslt
作为文件之一。卸载对此有依赖性吗?
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<xsl:output method="xml" indent="yes" />
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:key name="exe-search" match="wix:Component[contains(wix:File/@Source, 'MyService.exe')]" use="@Id" />
<xsl:template match="wix:Component[key('exe-search', @Id)]" />
<xsl:template match="wix:ComponentRef[key('exe-search', @Id)]" />
</xsl:stylesheet>