2015-04-12 34 views
1

我試圖建立自己的項目中WiX的安裝程序,但每次我建造它,我得到這4個錯誤:錯誤而試圖建立WiX的安裝程序

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 

它們在引用這一段代碼在產品.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工具集開始,大部分的時間,我不知道他們在說什麼。任何人都可以告訴我爲什麼這是導致錯誤,或者我應該怎麼做才能解決它?

+0

你是如何定義引用ComponentGroups?像這樣:' har07

+0

我沒有,這些都是自動生成的。 – thijmen321

+0

在這種情況下,您還必須將包含這些'ComponentGroup'的自動生成的文件添加到光照和蠟燭的命令行中。否則他們無法找到。 – taffit

回答

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> 

這是一個很大的代碼,但因爲我coulnd't找到它的任何地方我想我不妨離開這裏