Я пытаюсь использовать привязку "bind.fileVersion" из Wix3.(т.е. 3.11.1)
По какой-то причине я получаю следующее сообщение об ошибке:
Неразрешенная переменная времени привязки! (bind.fileVersion.TestWix3.exe).
Моя цель - заполнить строку «Идентификатор продукта».Особенно информация о версии = "$ (var.VERSION)".
Вот содержимое моего файла "Product.wxs":
<?xml version="1.0" encoding="UTF-8"?>
<?define LongName = "Test wix 3" ?>
<?define Manufacturer = "Test" ?>
<?define ProductUpgradeCode = "5fc3e435-fad3-4c1d-997f-3483beffe0a4" ?>
<?define MAINEXE=$(var.TestWix3.TargetFileName)?>
<?define VERSION="!(bind.fileVersion.$(var.MAINEXE))"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="$(var.LongName)" Language="1036" Codepage="1252" Version="$(var.VERSION)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.ProductUpgradeCode)">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="Wix3Installer" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="Wix3Installer" />
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
<!-- <Component Id="ProductComponent"> -->
<!-- TODO: Insert files, registry keys, and other resources here. -->
<!-- </Component> -->
</ComponentGroup>
</Fragment>
</Wix>
Вот скриншот моего решения в VS2017сообщество.![enter image description here](https://i.stack.imgur.com/nIEF1.png)
Вот ошибка: ![enter image description here](https://i.stack.imgur.com/sh9ea.png)
Есть идеи, почему не работает привязка (bind.fileVersion)?