无法加载 WixUIExtension.dll [英] WixUIExtension.dll could not be loaded
问题描述
我正在尝试制作 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:可能是除了 WixUIExtension
和 WixNtFxExtension<之外,您还直接包含了对
Wix.dll
的引用/code> - 您需要保留这两者.
换句话说:删除对 Wix.dll
的项目引用并尝试重新编译.
如果这不起作用,请删除所有引用并仅重新添加 WixUIExtension
和 WixNtFxExtension
.
一些建议和链接:
- 类似问题:我在哪里可以找到 Microsoft.Tools.WindowsInstallerXml.dll?
- 也许使用与临时目录不同的源路径.
- 也许可以从安装中排除
*.pdb
文件,除非您需要它进行调试. - 每个组件使用一个文件.恕我直言,这可以防止各种问题.
- 在发布之前从 WiX 源中去除您的 GUID - 或者它们可以被复制/粘贴.一点都不好.
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:
- Similar issue: Where do I find Microsoft.Tools.WindowsInstallerXml.dll?
- Maybe use a different source path than a temp directory.
- Maybe exclude the
*.pdb
file from installation, unless you need it for debugging. - Use one file per component. IMHO this prevents all kinds of problems.
- Strip your GUIDs from WiX sources before posting them - or they could be copy / pasted. Not good at all.
这篇关于无法加载 WixUIExtension.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!