1

我正在尝试制作一个 wix 安装程序。对于 Web 应用程序。

以下是我的 wsx v3.11 文件

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="Guid" Name="TestInstaller" Language="1033" Version="1.0.0.0" Manufacturer="CompanyName" UpgradeCode="Guid1">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platform="x64" />

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate EmbedCab="yes" />
    <PropertyRef Id="WIX_IS_NETFRAMEWORK_462_OR_LATER_INSTALLED"/>
    <Condition Message='This setup requires the .NET Framework 4.7 client profile installed.'>
      <![CDATA[Installed OR WIX_IS_NETFRAMEWORK_462_OR_LATER_INSTALLED]]>
    </Condition>
    <Feature Id="Complete" Title="TestInstaller" Description="TestInstaller" Level="1" ConfigurableDirectory='INSTALLFOLDER'>
      <ComponentGroupRef Id="ProductComponents" />
      <ComponentGroupRef Id="ProductBinComponents" />

    </Feature>


    <UIRef Id="WixUI_Mondo" />
    <UIRef Id="WixUI_ErrorProgressText" />
  </Product>

  <Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
     <Directory Id="INSTALLFOLDER" Name="Test Installer" >
        <Directory Id="INSTALLBINFOLDER" Name="bin">
        </Directory>
      </Directory>
    </Directory>
  </Fragment>

  <Fragment>
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
      <Component Id="ProductComponent" Win64="yes" Guid="*">
        <File Source="C:\Temp\Publish\Web.config" />
        <File Source="C:\Temp\Publish\NLog.config"/>
        <File Source="C:\Temp\Publish\Global.asax"/>
      </Component>
    </ComponentGroup>
    <ComponentGroup Id="ProductBinComponents" Directory="INSTALLBINFOLDER">
      <Component Id="ProductBinComponent" Win64="yes" Guid="*">
        <File Source="C:\Temp\Publish\bin\Antlr3.Runtime.dll"/>
        <File Source="C:\Temp\Publish\bin\Antlr3.Runtime.pdb"/>
      </Component>
    </ComponentGroup>
  </Fragment>
</Wix>

我的问题是我不知道这个错误消息是什么意思,并且不知道如何修复它。

程序集中未定义“Microsoft.Tools.WindowsInstallerXml.AssemblyDefaultWixExtensionAttribute”或扩展名中定义的类型“.......\Program Files (x86)\WiX Toolset v3.11\bin\WixUIExtension。 dll' 无法加载。

4

1 回答 1

1

1. RTF 许可证文件:首先确保您已创建自己的 RTF 许可证文件(使用写字板或类似工具),然后指定在您的 WiX 源中使用此 RTF 文件,如下所示:

<!-- Shown for context (one of several possible dialog sets): -->
<UIRef Id="WixUI_Mondo" /> 

<!-- The crucial variable that must be defined (for this dialog set): -->
<WixVariable Id="WixUILicenseRtf" Value="TestLicenseAgreement.rtf" />   

有关更多上下文和详细信息,请参阅此示例,了解需要对新的 WiX 项目进行哪些最小调整才能使其编译(请参阅底部的 WiX 标记中的内联注释)。


2. Wix.dll:可能是您直接包含了一个引用Wix.dll,除了WixUIExtensionWixNtFxExtension- 您需要保留这两者。

换句话说:删除项目引用Wix.dll并尝试重新编译。

如果这不起作用,请删除所有引用并仅重新添加WixUIExtensionand WixNtFxExtension


一些建议和链接

于 2018-08-10T00:26:35.517 回答