Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unresolved reference to symbol in WiX (LGHT0094) (No illegal characters?)

I have searched here for answers but as every case seems to be unique and so far no answers helped me, I decided to post my own. For some reason I am getting the following error about the following code. I can't seem to find anything wrong with it. It has no illegal characters as far as I can see. I've tried with and without the " and it doesn't make a difference. The line specifically referenced in the error is the verb line.

Error:

C:\Users\kylec\Desktop\SampleFirst\SampleFirst.wxs(25) : error LGHT0094 : 
Unresolved reference to symbol 'File:Viewer.exe' in section 
'Product:{00000000-0000-0000-0000000000000000}'.

Code:

<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
  <Product Name='Viewer 1.0' Id='PUT-GUID-HERE' UpgradeCode='PUT-GUID-HERE'
    Language='1033' Codepage='1252' Version='1.0.0' Manufacturer='Direct'>
    <Package Id='*' Keywords='Installer' Description="Installer"
      Comments='Installer is a registered trademark of Direct' 
      Manufacturer='Direct' InstallerVersion='100' Languages='1033' 
      Compressed='yes' SummaryCodepage='1252' />

    <Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' DiskPrompt="CD-ROM #1" />
    <Property Id='DiskPrompt' Value="Installation [1]" />

    <Directory Id='TARGETDIR' Name='SourceDir'>
      <Directory Id='ProgramFilesFolder' Name='PFiles'>
        <Directory Id='DataMotionDirect' Name='DMD'>
          <Directory Id='INSTALLDIR' Name='Viewer'>

           <Component Id='MainExecutable' Guid='*'>
               <Shortcut Id="startmenuViewer" Directory="ProgramMenuDir" 
                         Name="Viewer" WorkingDirectory='INSTALLDIR' 
                         Icon="Viewer.exe" IconIndex="0" Advertise="yes" />
                <Shortcut Id="desktopViewer" Directory="DesktopFolder" 
                          Name="Viewer" WorkingDirectory='INSTALLDIR' 
                          Icon="Viewer.exe" IconIndex="0" Advertise="yes" />

              <File Id='EXE' Name='Viewer.exe' DiskId='1' 
                    Source='Viewer.exe' KeyPath='yes'>
              </File>
        <ProgId Id="DMDCCDAV" Description="Viewer">
          <Extension Id="xml" >
            <Verb Id="open" Argument="&quot;%1&quot;" TargetFile="Viewer.exe" />
          </Extension>
        </ProgId>
            </Component>

          </Directory>
        </Directory>
      </Directory>

      <Directory Id="ProgramMenuFolder" Name="Programs">
       <Directory Id="ProgramMenuDir" Name="Viewer">
        <Component Id="ProgramMenuDir" Guid="*">
         <RemoveFolder Id='ProgramMenuDir' On='uninstall' />
         <RegistryValue Root='HKCU' Key='Software\[Manufacturer]\[ProductName]' 
                        Type='string' Value='' KeyPath='yes' />
        </Component>
       </Directory>
      </Directory>

      <Directory Id="DesktopFolder" Name="Desktop" />
    </Directory>

    <Feature Id='Complete' Level='1'>
      <ComponentRef Id='MainExecutable' />
      <ComponentRef Id='ProgramMenuDir' />
    </Feature>

    <Icon Id="Viewer.exe" SourceFile="Viewer.exe" />

  </Product>
</Wix>
like image 928
Kyle Avatar asked Jun 18 '14 19:06

Kyle


1 Answers

From the piece of source code you specified it is not clear what actual string wix references in fact. Would you kindly either highlight the string or post the entire file?

Ok then after you posted your entire file I see the problematic line. You must use file ID instead of file name there.

like image 60
Zorgiev Avatar answered Oct 17 '22 19:10

Zorgiev