如何包含由Heat创build的Wix碎片
我有以下片段:
<?xml version="1.0" encoding="utf-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Fragment> <ComponentGroup Id="Doc"> <ComponentRef Id="cmpCDCC386748AE7BEFE7C2F4E764390254" /> <ComponentRef Id="cmp6EC513AE37CCAE66CEA96577E2384AFA" /> <ComponentRef Id="cmp0C9D9450CB94FF74C6E29C1C3F6D16D5" /> <ComponentRef Id="cmp314DEE3E909157F47FDF963DCC04D2AC" /> <ComponentRef Id="cmpBC5FB761D7B0DA99F96ECA9A91DD4217" /> <ComponentRef Id="cmp6B9E4B7B6F710D7077171BCE0B96A90A" /> <ComponentRef Id="cmp5959CF1572C71417D536C491A996C6DE" /> <ComponentRef Id="cmpCC960E9F3DDDE1600206003C43FFE663" /> </ComponentGroup> </Fragment> <Fragment> <DirectoryRef Id="AzureApplicationSDK"> <Directory Id="dir67745C9C3FA1B31D9AF8883D12D8FBD8" Name="Doc"> <Component Id="cmpCDCC386748AE7BEFE7C2F4E764390254" Guid="{A46C5689-42D1-41CA-AD71-B2A416FA9571}"> <File Id="fil3B7DFCD3444314759F8617411F7EE08C" KeyPath="yes" Source="SourceDir\Azure Applications SDK v1 Cascade Tables Getting Started Guide.docx" /> </Component> <Component Id="cmp6EC513AE37CCAE66CEA96577E2384AFA" Guid="{697C1B04-5279-4B31-9600-F3BCA4C1AD06}"> <File Id="filFDDD2C48EF5C14BA924C4272E4D9D490" KeyPath="yes" Source="SourceDir\Azurite Identity.docx" /> </Component> <Component Id="cmp0C9D9450CB94FF74C6E29C1C3F6D16D5" Guid="{1C61C6C5-60F0-41A5-B229-093419E5F767}"> <File Id="fil4C736D0525C45780C242DA3BCA6823BA" KeyPath="yes" Source="SourceDir\Mercurius messaging how-to.docx" /> </Component> <Component Id="cmp314DEE3E909157F47FDF963DCC04D2AC" Guid="{FD9BD847-5B89-42EA-A178-451AC8B822F4}"> <File Id="fil841FCFCD72670AEF83A89B6724126546" KeyPath="yes" Source="SourceDir\Nexus Notes.pptx" /> </Component> <Component Id="cmpBC5FB761D7B0DA99F96ECA9A91DD4217" Guid="{2424B541-D40B-4D2D-938E-0AC5C9C2A773}"> <File Id="fil8D9E68E77FC45E6F50191FF6F20F2039" KeyPath="yes" Source="SourceDir\Owner Powershell Snapin.docx" /> </Component> <Component Id="cmp6B9E4B7B6F710D7077171BCE0B96A90A" Guid="{E467FD03-EFB4-4E4F-9A34-75540BEB1B1C}"> <File Id="filB48A598247AE4A63638F96A69A545EE4" KeyPath="yes" Source="SourceDir\SDK First Look.pptx" /> </Component> <Component Id="cmp5959CF1572C71417D536C491A996C6DE" Guid="{27890FBC-2822-4061-A086-E9E539F58A64}"> <File Id="fil9CCA5FE9338BD9EB6E1E2B4F685D9F16" KeyPath="yes" Source="SourceDir\Unit Tests.docx" /> </Component> <Component Id="cmpCC960E9F3DDDE1600206003C43FFE663" Guid="{D9B8BFB9-3F3B-40FE-A3E9-C5E1669E529A}"> <File Id="fil98D1506B9A1C3AD2D9D03EA43BEEB80A" KeyPath="yes" Source="SourceDir\Using Nexus.docx" /> </Component> </Directory> </DirectoryRef> </Fragment> </Wix>
在我的主要.wxs文件中,我有以下内容:
<Feature Id="MainApplication" Title="zure Application SDK" Level="1"> <ComponentRef Id="Doc"/> </Feature>
我执行
C:\Program Files (x86)\Windows Installer XML v3\bin\Light.exe -cultures:null -ext "C:\Program Files (x86)\Windows Installer XML v3\bin\WixUIExtension.dll" -ext "C:\Program Files (x86)\Windows Installer XML v3\bin\WixNetFxExtension.dll" -out "c:\source\Azure Applications SDK\Bespin\QADrop\QADropInstaller\bin\Release\QADropInstaller.msi" -pdbout "c:\source\Azure Applications SDK\Bespin\QADrop\QADropInstaller\bin\Release\QADropInstaller.wixpdb" -v obj\Release\QADropInstall.wixobj obj\Release\Doc.wixobj
我得到以下错误
Error 21 Unresolved reference to symbol 'Component:Doc' in section 'Product:{CF56D65B-BE0D-4719-BEFD-5DC04F7AD7FC}'. c:\source\Azure Applications SDK\Bespin\QADrop\QADropInstaller\QADropInstall.wxs 160 1 Azure Application SDK Installer
谁能告诉我我做错了什么?
Heat Fragment
应该有一个ComponentGroup
其中包含所有生成的Components
(如果没有,请尝试添加-cg
开关来加热)。
然后使用一个ComponentGroupRef
而不是一个ComponentRef
,在你希望安装的所有东西下。
最后,编译所有.wxs
文件(包括.wxs
文件),然后将所有.wixobj
文件添加到light.exe
命令行中。 您列出的错误通常是因为您忘记将.wixobj
或.wixlib
添加到命令行中而发生的。