1

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.

Helbo
  • 422
  • 6
  • 30
  • Just to cover the obvious: - Is WiX installed on the machine? (quick to forget if you switch computers). - If you comment out both the `UIRef` lines, does it then compile? - Have you added a project reference to the WixUIExtension.dll? (if you are in Visual Studio). Maybe see my [**minimal tweaks to fresh WiX template project to get it to compile piece here**](https://stackoverflow.com/a/47972615/129130) (see inline comments in WiX markup towards bottom). – Stein Åsmul Aug 09 '18 at 19:22
  • @SteinÅsmul Thanks for writing. If I comment out both the UIRef lines it compiles fine. I have added the dll for the WixUIExtension. Yes I am in visual studio. And yes I have WiX installed. I will look in to your link – Helbo Aug 10 '18 at 07:26

1 Answers1

1

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:

Stein Åsmul
  • 34,628
  • 23
  • 78
  • 140
  • I never added any References but WixUIExtension and WixNtFxExtension. And I've tried on multiple occasions to remove and add them again to see if that fixes the problem. I will look in to your links. and other suggestions. Thanks. – Helbo Aug 10 '18 at 07:28
  • your link from your comment made mine work. it was simply the lack of a licens RTF file that was the issue. – Helbo Aug 10 '18 at 07:51
  • Oh, that was surprising. I better update this answer to specify that explicitly as well. I did see the same error when adding `Wix.dll` though, so I will leave that in. – Stein Åsmul Aug 10 '18 at 13:09