Ali Kazmi
Ali Kazmi

Reputation: 1458

different version shown in properties of setup file and control panel

I have msi installer which is built using Wix Tools in Visual Studio 2012. I have set version of setup.exe using Version="(bind.FileVersion.File)". it looks good upto half way; means i get the same version displayed in Control Panel as the version of dll i have binded it to, after it has been installed. But the problem is when i see the properties of setup.exe file it shows me different one. Cant figure why this is happening? Any help will be appreciated Note I ma using 64-bit Windows 7 on 64-bit machine

Upvotes: 0

Views: 175

Answers (1)

David Martin
David Martin

Reputation: 12248

As you have mentioned an EXE rather than MSI I'm guessing that you are bundling your msi into a bootstrapper package.

To bind your exe version to your msi, use bind.packageVersion.PackageID as described here.

Here's an example of how to use it:

<?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>

To bind your MSI to your chosen assembly do the following:

<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)">

This should ensure the following binding order:

setup.exe -> install.msi -> assembly.dll

Upvotes: 3

Related Questions