无法加载 WixUIExtension.dll [英] WixUIExtension.dll could not be loaded

查看:27
本文介绍了无法加载 WixUIExtension.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试制作 wix 安装程序.用于网络应用程序.

以下是我的 wsx v3.11 文件

<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platform="x64"/><MajorUpgrade DowngradeErrorMessage="已经安装了更新版本的 [ProductName]."/><MediaTemplate EmbedCab="yes"/><PropertyRef Id="WIX_IS_NETFRAMEWORK_462_OR_LATER_INSTALLED"/><Condition Message='此设置需要安装 .NET Framework 4.7 客户端配置文件.'><![CDATA[已安装或 WIX_IS_NETFRAMEWORK_462_OR_LATER_INSTALLED]]></条件><Feature Id="Complete" Title="TestInstaller" Description="TestInstaller" Level="1" ConfigurableDirectory='INSTALLFOLDER'><ComponentGroupRef Id="ProductComponents"/><ComponentGroupRef Id="ProductBinComponents"/></功能><UIRef Id="WixUI_Mondo"/><UIRef Id="WixUI_ErrorProgressText"/></产品><片段><Directory Id="TARGETDIR" Name="SourceDir"><Directory Id="INSTALLFOLDER" Name="测试安装程序" ><Directory Id="INSTALLBINFOLDER" Name="bin"></目录></目录></目录></片段><片段><ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"><Component Id="ProductComponent" Win64="yes" Guid="*"><File Source="C:\Temp\Publish\Web.config"/><文件源="C:\Temp\Publish\NLog.config"/><文件源="C:\Temp\Publish\Global.asax"/></组件></组件组><ComponentGroup Id="ProductBinComponents" Directory="INSTALLBINFOLDER"><Component Id="ProductBinComponent" Win64="yes" Guid="*"><File Source="C:\Temp\Publish\bin\Antlr3.Runtime.dll"/><文件源="C:\Temp\Publish\bin\Antlr3.Runtime.pdb"/></组件></组件组></片段></Wix>

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

<块引用>

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

解决方案

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

<!-- 显示上下文(几个可能的对话框集之一):--><UIRef Id="WixUI_Mondo"/><!-- 必须定义的关键变量(对于此对话框集):--><WixVariable Id="WixUILicenseRtf" Value="TestLicenseAgreement.rtf"/>

<块引用>

有关更多上下文和详细信息,请查看此示例只需对新的 WiX 项目进行最少的调整即可实现编译(参见底部的 WiX 标记中的内联注释).

<小时>

2.Wix.dll:可能是除了 WixUIExtensionWixNtFxExtension<之外,您还直接包含了对 Wix.dll 的引用/code> - 您需要保留这两者.

<块引用>

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

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

<小时>

一些建议和链接:

I'm trying to make a wix installer. for a web application.

the following is my wsx v3.11 File

<?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>

my problem here is that I don't know what this error message means and by extension have no clue how to fix it.

Either 'Microsoft.Tools.WindowsInstallerXml.AssemblyDefaultWixExtensionAttribute' was not defined in the assembly or the type defined in extension '..........\Program Files (x86)\WiX Toolset v3.11\bin\WixUIExtension.dll' could not be loaded.

解决方案

1. RTF License File: First make sure you have created your own RTF license file (using WordPad or similar) and then specify to use this RTF file in your WiX source like this:

<!-- 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" />   

For more context and details, please see this example of what minimal tweaks are needed to a fresh WiX project to get it to compile (see inline comments in WiX markup towards bottom).


2. Wix.dll: It might be that you have included a reference directly to Wix.dll in addition to WixUIExtension and WixNtFxExtension - both of which you need to keep included.

So in other words: remove the project reference to Wix.dll and try to recompile.

If that does not work, remove all references and re-add only WixUIExtension and WixNtFxExtension.


Some Suggestions & Links:

这篇关于无法加载 WixUIExtension.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆