加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

未解决的WiX中的符号引用(LGHT0094)(没有非法字符?)

发布时间:2020-12-14 02:46:37 所属栏目:Windows 来源:网络整理
导读:我在这里寻找答案但是因为每个案例似乎都是独一无二的,到目前为止没有答案帮助我,我决定发布我自己的答案.由于某种原因,我收到以下有关以下代码的错误.我似乎无法找到任何错误.据我所知,它没有非法字符.我试过有没有“并没有什么区别.错误中具体引用的行是动
我在这里寻找答案但是因为每个案例似乎都是独一无二的,到目前为止没有答案帮助我,我决定发布我自己的答案.由于某种原因,我收到以下有关以下代码的错误.我似乎无法找到任何错误.据我所知,它没有非法字符.我试过有没有“并没有什么区别.错误中具体引用的行是动词行.

错误:

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

码:

<?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>

解决方法

从您指定的源代码片段中,实际上不清楚实际的字符串wix引用是什么.您是否要突出显示字符串或发布整个文件?

好的,然后在您发布整个文件后,我看到有问题的行.您必须使用文件ID而不是文件名.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读