title: WiX installer fails with error code 2819
body: <p>I am trying to create an installer using <a href="http://en.wikipedia.org/wiki/WiX" rel="noreferrer">WiX</a> which doesn't show the license agreement at the start. But I get the error as below.</p>
  
  <p><img src="https://i.stack.imgur.com/PIwuQ.png" alt="Screenshot"></p>
  
  <p>This is the full Product.wxs file I have at the moment. It compiles and builds OK. Why am I getting an error like this? Is my Fragment section in the right place? I have removed the Publish elements pertaining to license and modified the welcome dialog's next button to show the install directory dialog instead of license agreement. This is as mentioned in the help chm file. What am I missing then?</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"&gt;
      &lt;Product Id="077765d1-236d-4299-b751-f921828f2ac8"
             Name="Wix Setup Example"
             Language="1033"
             Version="1.0.0.0"
             Manufacturer="NBL" UpgradeCode="1b0f72a7-8e17-4897-9f96-66509cc39573"&gt;
  
          &lt;Package InstallerVersion="200" Compressed="yes"  /&gt;
  
          &lt;Media Id="1" Cabinet="media1.cab" EmbedCab="yes" /&gt;
  
          &lt;Directory Id="TARGETDIR" Name="SourceDir"&gt;
              &lt;Directory Id="ProgramFilesFolder"  &gt;
                  &lt;Directory Id="INSTALLLOCATION" Name="My Application Folder"&gt;
                      &lt;Component Id="ProductComponent" Guid="MY-GUID-HERE"&gt;
                          &lt;File Id="WindowsFormsApp.exe"
                              Source="../WindowsFormsApp/bin/Debug/WindowsFormsApp.exe"&gt;
                          &lt;/File&gt;
                      &lt;/Component&gt;
                  &lt;/Directory&gt;
              &lt;/Directory&gt;
          &lt;/Directory&gt;
  
          &lt;Feature Id="ProductFeature" Title="WixSetupProject" Level="1"&gt;
              &lt;ComponentRef Id="ProductComponent" /&gt;
          &lt;/Feature&gt;
  
          &lt;UI Id="WixUI_Advanced"&gt;
              &lt;TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" /&gt;
              &lt;TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" /&gt;
              &lt;TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" /&gt;
  
              &lt;Property Id="DefaultUIFont" Value="WixUI_Font_Normal" /&gt;
              &lt;Property Id="WixUI_Mode" Value="Advanced" /&gt;
  
              &lt;DialogRef Id="BrowseDlg" /&gt;
              &lt;DialogRef Id="DiskCostDlg" /&gt;
              &lt;DialogRef Id="ErrorDlg" /&gt;
              &lt;DialogRef Id="FatalError" /&gt;
              &lt;DialogRef Id="FilesInUse" /&gt;
              &lt;DialogRef Id="MsiRMFilesInUse" /&gt;
              &lt;DialogRef Id="PrepareDlg" /&gt;
              &lt;DialogRef Id="ProgressDlg" /&gt;
              &lt;DialogRef Id="ResumeDlg" /&gt;
              &lt;DialogRef Id="UserExit" /&gt;
  
              &lt;Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3"&gt;1&lt;/Publish&gt;
              &lt;Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4"&gt;&lt;![CDATA[WIXUI_INSTALLDIR_VALID&lt;&gt;"1"]]&gt;&lt;/Publish&gt;
  
              &lt;Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999"&gt;1&lt;/Publish&gt;
  
              &lt;Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Order="1"&gt;NOT Installed&lt;/Publish&gt;
              &lt;Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="1"&gt;Installed AND PATCH&lt;/Publish&gt;
  
              &lt;Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg"&gt;1&lt;/Publish&gt;
              &lt;Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1"&gt;1&lt;/Publish&gt;
              &lt;Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2"&gt;NOT WIXUI_DONTVALIDATEPATH&lt;/Publish&gt;
              &lt;Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"&gt;&lt;![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID&lt;&gt;"1"]]&gt;&lt;/Publish&gt;
              &lt;Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4"&gt;WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"&lt;/Publish&gt;
              &lt;Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1"&gt;1&lt;/Publish&gt;
              &lt;Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2"&gt;1&lt;/Publish&gt;
  
              &lt;Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1"&gt;NOT Installed&lt;/Publish&gt;
              &lt;Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2"&gt;Installed AND NOT PATCH&lt;/Publish&gt;
              &lt;Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2"&gt;Installed AND PATCH&lt;/Publish&gt;
  
              &lt;Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg"&gt;1&lt;/Publish&gt;
  
              &lt;Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg"&gt;1&lt;/Publish&gt;
              &lt;Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg"&gt;1&lt;/Publish&gt;
              &lt;Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg"&gt;1&lt;/Publish&gt;
  
              &lt;Property Id="ARPNOMODIFY" Value="1" /&gt;
          &lt;/UI&gt;
          &lt;UIRef Id="WixUI_Common" /&gt;
      &lt;/Product&gt;
      &lt;Fragment&gt;
          &lt;Property Id="ApplicationFolderName" Value="My Application Folder" /&gt;
          &lt;Property Id="WixAppFolder" Value="WixPerMachineFolder" /&gt;
  
          &lt;WixVariable Id="WixUISupportPerUser" Value="1" Overridable="yes" /&gt;
          &lt;WixVariable Id="WixUISupportPerMachine" Value="1" Overridable="yes" /&gt;
  
          &lt;PropertyRef Id="ApplicationFolderName" /&gt;
      &lt;/Fragment&gt;
  &lt;/Wix&gt;
  </code></pre>
  
  <p>The edited version of the WiX file that gives no error. This version however skips the install feature and browse for the file dialog:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"&gt;
      &lt;Product Id="077765d1-236d-4299-b751-f921828f2ac8"
             Name="Wix Setup Example"
             Language="1033"
             Version="1.0.0.0"
             Manufacturer="NBL" UpgradeCode="1b0f72a7-8e17-4897-9f96-66599gg39573"&gt;
  
          &lt;Package InstallerVersion="200" Compressed="yes"  /&gt;
  
          &lt;Media Id="1" Cabinet="media1.cab" EmbedCab="yes" /&gt;
  
          &lt;Directory Id="TARGETDIR" Name="SourceDir"&gt;
              &lt;Directory Id="ProgramFilesFolder"&gt;
                  &lt;Directory Id="INSTALLLOCATION" Name="My Application Folder"&gt;
                      &lt;Component Id="ProductComponent" Guid="17e13748-8d44-47f6-b020-66d29f8a84fe"&gt;
                          &lt;File Id="WindowsFormsApp.exe"
                              Source="../WindowsFormsApp/bin/Debug/WindowsFormsApp.exe"&gt;
                          &lt;/File&gt;
                      &lt;/Component&gt;
                  &lt;/Directory&gt;
              &lt;/Directory&gt;
          &lt;/Directory&gt;
  
          &lt;Feature Id="ProductFeature" Title="WixSetupProject" Level="1"&gt;
              &lt;ComponentRef Id="ProductComponent" /&gt;
          &lt;/Feature&gt;
  
          &lt;UI Id="WixUI_Advanced"&gt;
              &lt;TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" /&gt;
              &lt;TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" /&gt;
              &lt;TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" /&gt;
  
              &lt;Property Id="DefaultUIFont" Value="WixUI_Font_Normal" /&gt;
              &lt;Property Id="WixUI_Mode" Value="Advanced" /&gt;
              &lt;Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" /&gt;
  
              &lt;DialogRef Id="BrowseDlg" /&gt;
              &lt;DialogRef Id="DiskCostDlg" /&gt;
              &lt;DialogRef Id="ErrorDlg" /&gt;
              &lt;DialogRef Id="FatalError" /&gt;
              &lt;DialogRef Id="FilesInUse" /&gt;
              &lt;DialogRef Id="MsiRMFilesInUse" /&gt;
              &lt;DialogRef Id="PrepareDlg" /&gt;
              &lt;DialogRef Id="ProgressDlg" /&gt;
              &lt;DialogRef Id="ResumeDlg" /&gt;
              &lt;DialogRef Id="UserExit" /&gt;
  
              &lt;Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3"&gt;1&lt;/Publish&gt;
              &lt;Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4"&gt;&lt;![CDATA[WIXUI_INSTALLDIR_VALID&lt;&gt;"1"]]&gt;&lt;/Publish&gt;
  
              &lt;Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999"&gt;1&lt;/Publish&gt;
  
              &lt;Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="BrowseDlg" Order="1"&gt;1&lt;/Publish&gt;
              &lt;Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="1"&gt;1&lt;/Publish&gt;
  
              &lt;Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="BrowseDlg"&gt;1&lt;/Publish&gt;
              &lt;Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1"&gt;1&lt;/Publish&gt;
              &lt;Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2"&gt;NOT WIXUI_DONTVALIDATEPATH&lt;/Publish&gt;
              &lt;Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"&gt;&lt;![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID&lt;&gt;"1"]]&gt;&lt;/Publish&gt;
              &lt;Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4"&gt;WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"&lt;/Publish&gt;
              &lt;Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1"&gt;1&lt;/Publish&gt;
              &lt;Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2"&gt;1&lt;/Publish&gt;
  
              &lt;Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="1"&gt;NOT Installed&lt;/Publish&gt;
              &lt;Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2"&gt;Installed AND NOT PATCH&lt;/Publish&gt;
              &lt;Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2"&gt;Installed AND PATCH&lt;/Publish&gt;
  
              &lt;Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg"&gt;1&lt;/Publish&gt;
  
              &lt;Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg"&gt;1&lt;/Publish&gt;
              &lt;Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg"&gt;1&lt;/Publish&gt;
              &lt;Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg"&gt;1&lt;/Publish&gt;
  
              &lt;Property Id="ARPNOMODIFY" Value="1" /&gt;
          &lt;/UI&gt;
          &lt;UIRef Id="WixUI_Common" /&gt;
      &lt;/Product&gt;
  
      &lt;Fragment&gt;
          &lt;Property Id="ApplicationFolderName" Value="My Application Folder" /&gt;
          &lt;Property Id="WixAppFolder" Value="WixPerMachineFolder" /&gt;
  
          &lt;WixVariable Id="WixUISupportPerUser" Value="1" Overridable="yes" /&gt;
          &lt;WixVariable Id="WixUISupportPerMachine" Value="1" Overridable="yes" /&gt;
  
          &lt;PropertyRef Id="ApplicationFolderName" /&gt;
          &lt;UI &gt;
              &lt;Dialog Id="CustomBrowseDlg" Width="370" Height="270" Title="!(loc.BrowseDlg_Title)"&gt;
                  &lt;Control Id="PathEdit" Type="PathEdit" X="25" Y="202" Width="320" Height="18" Property="_BrowseProperty" Indirect="yes" /&gt;
                  &lt;Control Id="OK" Type="PushButton" X="240" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUIOK)"&gt;
                      &lt;Publish Event="SetTargetPath" Value="[_BrowseProperty]"&gt;1&lt;/Publish&gt;
                      &lt;Publish Event="EndDialog" Value="Return"&gt;1&lt;/Publish&gt;
                  &lt;/Control&gt;
                  &lt;Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)"&gt;
                      &lt;Publish Event="Reset" Value="0"&gt;1&lt;/Publish&gt;
                      &lt;Publish Event="EndDialog" Value="Return"&gt;1&lt;/Publish&gt;
                  &lt;/Control&gt;
                  &lt;Control Id="ComboLabel" Type="Text" X="25" Y="58" Width="44" Height="10" TabSkip="no" Text="!(loc.BrowseDlgComboLabel)" /&gt;
                  &lt;Control Id="DirectoryCombo" Type="DirectoryCombo" X="70" Y="55" Width="220" Height="80" Property="_BrowseProperty" Indirect="yes" Fixed="yes" Remote="yes"&gt;
                      &lt;Subscribe Event="IgnoreChange" Attribute="IgnoreChange" /&gt;
                  &lt;/Control&gt;
                  &lt;Control Id="WixUI_Bmp_Up" Type="PushButton" X="298" Y="55" Width="19" Height="19" ToolTip="!(loc.BrowseDlgWixUI_Bmp_UpTooltip)" Icon="yes" FixedSize="yes" IconSize="16" Text="!(loc.BrowseDlgWixUI_Bmp_Up)"&gt;
                      &lt;Publish Event="DirectoryListUp" Value="0"&gt;1&lt;/Publish&gt;
                  &lt;/Control&gt;
                  &lt;Control Id="NewFolder" Type="PushButton" X="325" Y="55" Width="19" Height="19" ToolTip="!(loc.BrowseDlgNewFolderTooltip)" Icon="yes" FixedSize="yes" IconSize="16" Text="!(loc.BrowseDlgNewFolder)"&gt;
                      &lt;Publish Event="DirectoryListNew" Value="0"&gt;1&lt;/Publish&gt;
                  &lt;/Control&gt;
                  &lt;Control Id="DirectoryList" Type="DirectoryList" X="25" Y="83" Width="320" Height="98" Property="_BrowseProperty" Sunken="yes" Indirect="yes" TabSkip="no" /&gt;
                  &lt;Control Id="PathLabel" Type="Text" X="25" Y="190" Width="320" Height="10" TabSkip="no" Text="!(loc.BrowseDlgPathLabel)" /&gt;
                  &lt;Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.BrowseDlgBannerBitmap)" /&gt;
                  &lt;Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" /&gt;
                  &lt;Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" /&gt;
                  &lt;Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.BrowseDlgDescription)" /&gt;
                  &lt;Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.BrowseDlgTitle)" /&gt;
              &lt;/Dialog&gt;
          &lt;/UI&gt;
      &lt;/Fragment&gt;
  &lt;/Wix&gt;
  </code></pre>