wix扩展名中的冲突:NetFxExtension

时间:2016-09-09 05:49:26

标签: visual-studio visual-studio-2015 wix wix3.10

我正在尝试使用Wix在Visual Studio 2015中创建一个bootstrapper项目。

<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   

我不知道造成这种情况的原因。我该如何解决?

1 个答案:

答案 0 :(得分:0)

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

(另外我得到一个未解决的符号WixNetFxExtension,我将提交一个单独的问题。)