tags:

views:

1653

answers:

4

I have the following fragment

<?xml version="1.0" encoding="utf-8"?>

in my main .wxs file I have the following

    <Feature Id="MainApplication" Title="zure Application SDK" Level="1">
<ComponentRef Id="Doc"/>

</Feature>

I execute 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

and I get the following error 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

Can anyone tell me what I'm doing wrong?

A: 

You will need to compile the *.wxi file you have that contains your fragment into a *.wixobj and then include that *.wixobj in the call the "Light.exe"

Marc

marc_s
I did that I thought. I use candle main.wxscandle doc.wxs light main.wixobj doc.wixobjand I get error LGHT0094: Unresolved reference to symbol 'Component:Doc' in section 'Product:{CF56D65B-BE0D-4719-BEFD-5DC04F7AD7FC}'.
Michael
You don't need a .wxi (WiX include) file at all. This suggestion is not the ideal solution.
Rob Mensching
ok, so these fragments aren't usually generated into a *.wxi file? I thought that was the usual case (it is the case in my installer - WiX 2.0 with a custom version of Tallow)
marc_s
No, Fragments are not the same as Includes. Tallow didn't generate .wxi files either. Take a look at the first couple chapters of the WiX.chm. It talks about Fragments and how they are linked in.
Rob Mensching
A: 

The issue was with the way I included the component.

It should be Not

Michael
"It should be Not"???
MPritch
+6  A: 

The heat Fragment should have a ComponentGroup with all of the generated Components in it (if not, try adding the -cg switch to heat). Then use a ComponentGroupRef instead of a ComponentRef under the Feature you want everything installed. Finally, compile all your .wxs files (including the one from heat.exe) then add all the resultant .wixobj files to your light.exe commmand-line. The error you list usually occurs because you forgot to add a .wixobj or .wixlib to the command-line.

Rob Mensching
A: 

Michael, how did you finally include the component?

Johan