0

我正在尝试使用 Wix 在 Visual Studio 2015 中创建一个引导程序项目。

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"
     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
  <Bundle Name="..." Version="1.0.0.0" Manufacturer="..." UpgradeCode="...">
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
      <bal:WixStandardBootstrapperApplication LicenseFile="mtel-eula-free.rtf"/>
    </BootstrapperApplicationRef>
    <BootstrapperApplicationRef Id="WixBootstrapperApplication:WixNetFxExtension" />
    <BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost">
      <Payload
        Name="BootstrapperCore.config"
        SourceFile="$(var.TargetDir)\BootstrapperCore.config"/>
      <Payload
        SourceFile="$(var.TargetPath)"/>
    </BootstrapperApplicationRef>
    <Chain>
      <PackageGroupRef Id="NetFx45Web"/>
      <MsiPackage Id="MTESetup" SourceFile="$(var.MTESetup.TargetPath)"/>
    </Chain>
  </Bundle>
</Wix>

引导程序的项目名称是 MTEBootstrapper,MSI 的 wix 项目的项目名称是 MTESetup。对于 MTEBootstrapper,我从 Wix 3.10 添加了对 WixNetFxExtension.dll 的引用;在 MTEBootstrapper 的属性中,我添加了-ext WixNetFxExtension.dll. 现在,当我尝试构建 MTEBootstrapper 时出现此错误:

Error       The extension 'Microsoft.Tools.WindowsInstallerXml.Extensions.NetFxExtension' contains a defintion for table 'NetFxNativeImage' that collides with a previously loaded table definition.  Please remove one of the conflicting extensions or rename one of the tables to avoid the collision.   MTEBootstrapper light.exe   0   

我不知道是什么原因造成的。我如何解决它?

4

1 回答 1

1

当我将 WixNetFxExtension 的引用添加到 MTEBootstrapper 和链接器的 -ext 选项时,看起来这个错误表面。我删除了链接器的 -ext 选项,并且冲突错误消失了。

(另外,我得到了一个未解析的符号 WixNetFxExtension,我将为此提出一个单独的问题。)

于 2016-09-09T14:24:43.683 回答