无法获取要编译的 assemblyFileBinding
Unable to get assemblyFileBinding to compile
我正在尝试使用 AssemblyFileVersion 绑定(如下面的完整 WSX 所示)。我总是得到这个编译错误:
error LGHT0298: Unresolved bind-time variable
!(bind.assemblyFileVersion.filMobiusExe)
你能看出哪里不对吗?我已将我引用的 filMobiusExe
声明为 .net 程序集,事实就是如此。我是否需要使用一些额外的命令行开关或扩展?我正在使用 3.10.2.2516。我使用 Heat 生成 AsiWix_Generated ComponentGroup。
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product
Id="..."
Name="MyStuff"
Language="1033"
Version="!(bind.assemblyFileVersion.filMobiusExe)"
Manufacturer="Autonomous Solutions, Inc."
UpgradeCode="...">
<Package Id="*"
InstallerVersion="200"
Compressed="yes"
InstallScope="perMachine"
Description="My Stuff"/>
<Property Id="TARGETSERVERADDRESS" Value="http://localhost:18080/"/>
<MediaTemplate EmbedCab="yes" CompressionLevel="high" MaximumUncompressedMediaSize="10000"/>
<Property Id="ARPNOREPAIR" Value="yes" Secure="yes" />
<Property Id="ARPNOMODIFY" Value="yes" Secure="yes" />
<Property Id="MSIFASTINSTALL" Value="1" /><!-- disable restore point creation -->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramMenuFolder">
<Directory Id="ProgramMenuDirAsiRoot" Name="ASI">
<Directory Id="ProgramMenuDirAsi" Name="Mobius">
</Directory>
</Directory>
</Directory>
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLDIRROOT" Name="ASI">
<Directory Id="INSTALLDIR" Name="Mobius">
<Component Id="cmpMobiusExe" Guid="*">
<File Id="filMobiusExe" KeyPath="yes" Source="$(var.AsiWixSourceDir)\Mobius.exe" Vital="yes" Assembly=".net"
AssemblyApplication="filMobiusExe" ProcessorArchitecture="msil">
<Shortcut Id="ApplicationStartMenuShortcut" Name="Mobius" Description="Client" WorkingDirectory="INSTALLDIR" Advertise="yes" Directory="ProgramMenuDirAsi" />
</File>
<File Id="filMobiusConfig" Source="$(var.AsiWixSourceDir)\Mobius.exe.config" />
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
<Component Id="SetConfigToServerAddress" Guid="..." KeyPath="yes" Directory="INSTALLDIR">
<Condition>TARGETSERVERADDRESS</Condition>
<util:XmlFile Id="AppConfigSetServerAddress" Action="setValue" Permanent="yes"
File="#filMobiusConfig" Name="value"
ElementPath="/configuration/appSettings/add[\[]@key='ServerAddress'[\]]"
Value="[TARGETSERVERADDRESS]" />
</Component>
<Component Id="SetConfigToServerExe" Guid="..." KeyPath="yes" Directory="INSTALLDIR">
<Condition>TARGETSERVEREXE</Condition>
<util:XmlFile Id="AppConfigSetServerExecutable" Action="setValue" Permanent="yes"
File="#filMobiusConfig" Name="value"
ElementPath="/configuration/appSettings/add[\[]@key='ServerPath'[\]]"
Value="[TARGETSERVEREXE]" />
</Component>
<Feature Id="ProductFeature" Title="Mobius.Setup" Level="1">
<ComponentRef Id="cmpMobiusExe"/>
<ComponentGroupRef Id="AsiWix_Generated"/>
<ComponentRef Id="SetConfigToServerAddress"/>
<ComponentRef Id="SetConfigToServerExe"/>
</Feature>
<SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLDIR]" After="CostFinalize" />
</Product>
</Wix>
尝试使用 !(bind.fileVersion.filMobiusExe).
我正在尝试使用 AssemblyFileVersion 绑定(如下面的完整 WSX 所示)。我总是得到这个编译错误:
error LGHT0298: Unresolved bind-time variable !(bind.assemblyFileVersion.filMobiusExe)
你能看出哪里不对吗?我已将我引用的 filMobiusExe
声明为 .net 程序集,事实就是如此。我是否需要使用一些额外的命令行开关或扩展?我正在使用 3.10.2.2516。我使用 Heat 生成 AsiWix_Generated ComponentGroup。
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product
Id="..."
Name="MyStuff"
Language="1033"
Version="!(bind.assemblyFileVersion.filMobiusExe)"
Manufacturer="Autonomous Solutions, Inc."
UpgradeCode="...">
<Package Id="*"
InstallerVersion="200"
Compressed="yes"
InstallScope="perMachine"
Description="My Stuff"/>
<Property Id="TARGETSERVERADDRESS" Value="http://localhost:18080/"/>
<MediaTemplate EmbedCab="yes" CompressionLevel="high" MaximumUncompressedMediaSize="10000"/>
<Property Id="ARPNOREPAIR" Value="yes" Secure="yes" />
<Property Id="ARPNOMODIFY" Value="yes" Secure="yes" />
<Property Id="MSIFASTINSTALL" Value="1" /><!-- disable restore point creation -->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramMenuFolder">
<Directory Id="ProgramMenuDirAsiRoot" Name="ASI">
<Directory Id="ProgramMenuDirAsi" Name="Mobius">
</Directory>
</Directory>
</Directory>
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLDIRROOT" Name="ASI">
<Directory Id="INSTALLDIR" Name="Mobius">
<Component Id="cmpMobiusExe" Guid="*">
<File Id="filMobiusExe" KeyPath="yes" Source="$(var.AsiWixSourceDir)\Mobius.exe" Vital="yes" Assembly=".net"
AssemblyApplication="filMobiusExe" ProcessorArchitecture="msil">
<Shortcut Id="ApplicationStartMenuShortcut" Name="Mobius" Description="Client" WorkingDirectory="INSTALLDIR" Advertise="yes" Directory="ProgramMenuDirAsi" />
</File>
<File Id="filMobiusConfig" Source="$(var.AsiWixSourceDir)\Mobius.exe.config" />
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
<Component Id="SetConfigToServerAddress" Guid="..." KeyPath="yes" Directory="INSTALLDIR">
<Condition>TARGETSERVERADDRESS</Condition>
<util:XmlFile Id="AppConfigSetServerAddress" Action="setValue" Permanent="yes"
File="#filMobiusConfig" Name="value"
ElementPath="/configuration/appSettings/add[\[]@key='ServerAddress'[\]]"
Value="[TARGETSERVERADDRESS]" />
</Component>
<Component Id="SetConfigToServerExe" Guid="..." KeyPath="yes" Directory="INSTALLDIR">
<Condition>TARGETSERVEREXE</Condition>
<util:XmlFile Id="AppConfigSetServerExecutable" Action="setValue" Permanent="yes"
File="#filMobiusConfig" Name="value"
ElementPath="/configuration/appSettings/add[\[]@key='ServerPath'[\]]"
Value="[TARGETSERVEREXE]" />
</Component>
<Feature Id="ProductFeature" Title="Mobius.Setup" Level="1">
<ComponentRef Id="cmpMobiusExe"/>
<ComponentGroupRef Id="AsiWix_Generated"/>
<ComponentRef Id="SetConfigToServerAddress"/>
<ComponentRef Id="SetConfigToServerExe"/>
</Feature>
<SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLDIR]" After="CostFinalize" />
</Product>
</Wix>
尝试使用 !(bind.fileVersion.filMobiusExe).