Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

xml - WixUIExtension.dll could not be loaded

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:TempPublishWeb.config" />
        <File Source="C:TempPublishNLog.config"/>
        <File Source="C:TempPublishGlobal.asax"/>
      </Component>
    </ComponentGroup>
    <ComponentGroup Id="ProductBinComponents" Directory="INSTALLBINFOLDER">
      <Component Id="ProductBinComponent" Win64="yes" Guid="*">
        <File Source="C:TempPublishinAntlr3.Runtime.dll"/>
        <File Source="C:TempPublishinAntlr3.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.11inWixUIExtension.dll' could not be loaded.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...