WiX wxl文件不能替代ProductTitleVersion

时间:2015-06-26 03:27:28

标签: wix

这是我的.wixproj:

  <?xml version="1.0" encoding="utf-8"?>
  <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
    <PropertyGroup>
      <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
      ...
      <MSIProductTitleVersion Condition="'$(MSIProductTitleVersion)' == ''">1.1.1.1 (Staging)</MSIProductTitleVersion>
      ...          
    <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
      <OutputPath>bin\Debug\</OutputPath>
      <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
      <DefineConstants>
        Debug;CabName=$(MSICabName);ProductTitleVersion=$(MSIProductTitleVersion);ProductVersion=$(MSIProductVersion);Manufacturer=$(MSIManufacturer);ProductCode=$(MSIProductCode);UpgradeCode=$(MSIUpgradeCode);PackageCode=$(MSIPackageCode);
      </DefineConstants>
    </PropertyGroup>

WXL:

<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
  <String Id="WelcomeDlgDescription">The Setup Wizard will install [ProductTitleVersion] on your computer. Click Next to continue or Cancel to exit the Setup Wizard.</String>

最终结果只是安装程序对话框标题中的空白区域。

使用ProductVersion按预期工作。

1 个答案:

答案 0 :(得分:0)

好的,就是这样;在我的.wxs文件中,我需要:

        <Property Id="ProductTitleVersion">$(var.ProductTitleVersion)</Property>
      </Product>
    </Wix>

我想.wxs然后.wixproj处理中的.wxl值可用。