安装文件和控制面板属性中显示的不同版本

时间:2013-12-20 10:46:01

标签: visual-studio-2012 wix

我有使用Visual Studio 2012中的Wix工具构建的msi安装程序。 我使用Version =“(bind.FileVersion.File)”设置了setup.exe的版本。 中途看起来不错;意味着我得到Control中显示的相同版本 面板作为dll的版本,我已经将它绑定到安装后的版本。 但问题是,当我看到setup.exe文件的属性时,它会显示给我 不同的。 无法想象为什么会这样? 任何帮助将不胜感激 注意我在64位计算机上使用64位Windows 7

1 个答案:

答案 0 :(得分:3)

正如你提到的那样,我提到的是一个EXE而不是MSI,我猜你正在将你的msi捆绑到一个bootstrapper包中。

要将您的exe版本绑定到您的msi,请按照here所述使用bind.packageVersion.PackageID

以下是如何使用它的示例:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Bundle Name="Bootstrapper1" 
            Version="!(bind.PackageVersion.master)" 
            Manufacturer="Test" 
            UpgradeCode="$(var.UpgradeCode)">
        <BootstrapperApplicationRef
            Id="WixStandardBootstrapperApplication.RtfLicense" />
        <Chain>
            <MsiPackage Id="master" SourceFile="MyInstaller.msi" />
        </Chain>
    </Bundle>
</Wix>

要将MSI绑定到所选的程序集,请执行以下操作:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" 
     xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">

  <Product Id="*"
           Name="MyProduct"
           Language="1033"
           Version="!(bind.fileVersion.My.dll)"
           Manufacturer="Test"
           UpgradeCode="$(var.UpgradeCode)">

这应该确保以下绑定顺序:

setup.exe -> install.msi -> assembly.dll
相关问题