尝试构建WiX安装程序时出错

时间:2015-04-12 16:06:29

标签: c# .net xml wix wix3.9

我正在尝试为我的项目构建一个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 Toolset,大多数时候我都不知道他们在说什么。任何人都可以告诉我为什么这会导致错误或我应该怎么做才能解决它?

1 个答案:

答案 0 :(得分: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>

这是很多代码,但由于我无法在任何地方找到它,我想我也可以把它留在这里