1

我正在尝试为我的项目构建一个 WiX 安装程序,但每次构建它时都会出现以下 4 个错误:

Unresolved reference to symbol 'WixComponentGroup:ServerGUIPlugin.Sources' in section 'Product:{3BEDB48C-1347-4875-AA2C-920435B662E3}'. C:\Users\...\WixInstaller\Product.wxs 33
Unresolved reference to symbol 'WixComponentGroup:ServerGUIPlugin.Binaries' in section 'Product:{3BEDB48C-1347-4875-AA2C-920435B662E3}'.    C:\Users\...\WixInstaller\Product.wxs 34
Unresolved reference to symbol 'WixComponentGroup:AttachToGUI.Binaries' in section 'Product:{3BEDB48C-1347-4875-AA2C-920435B662E3}'.    C:\Users\...\WixInstaller\Product.wxs 37
Unresolved reference to symbol 'WixComponentGroup:ServerGUI.Binaries' in section 'Product:{3BEDB48C-1347-4875-AA2C-920435B662E3}'.  C:\Users\...\WixInstaller\Product.wxs 38

他们引用了 Product.wxs 中的这段代码:

<Feature Id="ProductFeature" Title="WixInstaller" Level="1"> 
  <ComponentGroupRef Id="ServerGUIPlugin.Sources" />    <!--This line-->
  <ComponentGroupRef Id="ServerGUIPlugin.Binaries" />   <!--This line-->
  <ComponentGroupRef Id="RegistryGroup" />
  <ComponentRef Id="comp_4ABDC32C_56A9_4E3D_9640_14D1E430A1CD" />
  <ComponentGroupRef Id="AttachToGUI.Binaries" />       <!--This line-->
  <ComponentGroupRef Id="ServerGUI.Binaries" />         <!--This line-->
  <ComponentRef Id="comp_22A86C14_76CC_472B_9016_90FD42925402" />
</Feature>

我在互联网上搜索了解决方案,但我刚开始使用 WiX 工具集,而且大多数时候我不知道他们在说什么。谁能告诉我为什么这会导致错误或我应该做些什么来解决它?

4

1 回答 1

0

更新 我们的问题解决了!以下是我们的做法:

    <Fragment>
        <Directory Id="TARGETDIR" Name="SourceDir">
          <Component Id="comp_22A86C14_76CC_472B_9016_90FD42925402" Guid="..." Permanent="no" SharedDllRefCount="no" Transitive="no">
            <File Id="..." DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="GMap.NET.Core.dll" Source="..." KeyPath="yes" />
            <File Id=".." DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="GMap.NET.WindowsForms.dll" Source="..." />
            <File Id="..." DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="GUIComponents.dll" Source="..." />
            <File Id="..." DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="ServerGUIPlugin.dll" Source="..." />
          </Component>
          <Directory Id="..." Name="Plugin Source">
            <Directory Id="ServerGUIPlugin.Sources" />
            <Directory Id="ServerGUIPlugin.Binaries" />
          </Directory>
          <Directory Id="AttachToGUI.Binaries" />
          <Directory Id="ServerGUI.Binaries" />
          <Component Id="comp_4ABDC32C_56A9_4E3D_9640_14D1E430A1CD" Guid="..." Permanent="no" SharedDllRefCount="no" Transitive="no">
            <File Id="..." DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="Attach.ico" Source="..." KeyPath="yes" />
        </Component>
        </Directory>
        <DirectoryRef Id="ServerGUI.Binaries">
          <Component Id="ServerGUI.exe" Guid="...">
            <File Id="ServerGUI.exe" Source="..." KeyPath="yes" Checksum="yes" />
          </Component>
        </DirectoryRef>
        <DirectoryRef Id="AttachToGUI.Binaries">
          <Component Id="AttachToGUI.exe" Guid="...">
            <File Id="AttachToGUI.exe" Source="..." KeyPath="yes" Checksum="yes" />
          </Component>
        </DirectoryRef>
        <DirectoryRef Id="ServerGUIPlugin.Binaries">
          <Component Id="ServerGUIPlugin.dll" Guid="...">
            <File Id="ServerGUIPlugin.dll" Source="..." KeyPath="yes" Checksum="yes" />
          </Component>
        </DirectoryRef>
        <DirectoryRef Id="ServerGUIPlugin.Sources">
          <Component Id="PluginBase.cs" Guid="...">
            <File Id="PluginBase.cs" Source="..." KeyPath="yes" Checksum="yes" />
          </Component>
          <Component Id="SGPluginAttribute.cs" Guid="...">
            <File Id="SGPluginAttribute.cs" Source="..." KeyPath="yes" Checksum="yes" />
          </Component>
        </DirectoryRef>
      </Fragment>
      <Fragment>
        <ComponentGroup Id="ServerGUI.Binaries">
          <ComponentRef Id="ServerGUI.exe" />
        </ComponentGroup>
        <ComponentGroup Id="AttachToGUI.Binaries">
          <ComponentRef Id="AttachToGUI.exe" />
        </ComponentGroup>
        <ComponentGroup Id="ServerGUIPlugin.Binaries">
          <ComponentRef Id="ServerGUIPlugin.dll" />
        </ComponentGroup>
        <ComponentGroup Id="ServerGUIPlugin.Sources">
          <ComponentRef Id="PluginBase.cs" />
          <ComponentRef Id="SGPluginAttribute.cs" />
        </ComponentGroup>
      </Fragment>

那是很多代码,但是由于我在任何地方都找不到它,所以我想我不妨把它留在这里

于 2015-04-17T19:19:25.140 回答