我试图使用AssemblyFileVersion绑定(如下面的完整WSX所示)。我总是得到这个编译错误:
你能看到什么问题吗?我已将我引用的错误LGHT0298:未解析的绑定时变量 !(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>
答案 0 :(得分:2)
尝试使用!(bind.fileVersion.filMobiusExe)。