Hi Shivit,

I ran into the same problem. My workaround is to not use -sfrag and  
hand-edit the output .wxs to change the top-level Directory tag to a  
DirectoryRef tag and set the id to INSTALLDIR.

In the main .wxs I have <Directory Id="INSTALLDIR" ...> inside a  
<Directory Id="TARGETDIR">. This creates the directory structure in  
the main .wxs and then adds to it in the .wxs generated by heat.exe.

I'm not sure what the correct WIX-ish fix to the underlying problem  
is, but as it is right now heat.exe is difficult to use in an  
automated build process. I found a thread somewhere describing how  
someone is using xslt translations to automate fixing the output of  
heat.exe, but this is a bit beyond my level of XML kung-fu at the  
moment.

cheers,
-Mark

On 3-Mar-08, at 1:31 AM, shivit wrote:

>
> Hi
> I am using the heat tool to generate the directory structure.
> heat.exe dir -gg -template:fragment -sfrag "C:\FolderName" -out
> FolderName.wxs
>
> In FolderName.wxs, it groups all the ComponentRef elements under
> <ComponentGroup Id="ComponentGroup1">
>
> In my main program, I am having
> <Feature Id ="MyFeature" Title="Feature" Level="1">
> <ComponentGroupRef Id="ComponentGroup1" Primary="yes" />
> </Feature>
>
> But I am encountering error CNDL0205. There may only be a single root
> directory per product or module and its Id attribute value must be
> 'TARGETDIR' and its Name attribute value must be 'SourceDir'.
>
> Please help me how to remove this error. Should I try for Merge module
> instead of fragment?
> Thanks.:-)
>
> -- 
> View this message in context: 
> http://www.nabble.com/ComponentGroupRef-element---error-CNDL0205-tp15798392p15798392.html
> Sent from the wix-users mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to