David, If the file lived in SourceDir (which is set to TARGETDIR), you would want to use
<DirectoryRef Id="TARGETDIR"> not <DirectoryRef Id="INSTALLDIR"> in your fragment. Julie Campbell [EMAIL PROTECTED] -----Original Message----- Message: 1 Date: Fri, 25 May 2007 11:56:54 -0700 (PDT) From: Didactylos <[EMAIL PROTECTED]> Subject: [WiX-users] Source directory resolution in fragments To: wix-users@lists.sourceforge.net Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=us-ascii I had a directory structure like this (I've simplified a bit): <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLDIR" Name="MyProduct" SourceName="."> <Component Id="file.exe" Guid="491167D5-19F9-4271-8BC5-7D16394F2ED0"> <File Id="file.exe" Name="file.exe" KeyPath="yes"/> </Component> </Directory> </Directory> </Directory> It correctly found file.exe at .\SourceDir\file.exe I then refactored my components into fragments. In one file: <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLDIR" Name="MyProduct" SourceName="." /> </Directory> </Directory> And in another file: <Fragment> <DirectoryRef Id="INSTALLDIR"> <Component Id="file.exe" Guid="491167D5-19F9-4271-8BC5-7D16394F2ED0"> <File Id="file.exe" Name="file.exe" KeyPath="yes"/> </Component> </DirectoryRef> </Fragment> Now light looks for file.exe at .\file.exe - and fails, obviously. All the examples I can find show each file given an explicit source path, but this seems unnecessarily ugly to me. How can I make it pick up the source tree from the directory hierarchy again? Thank you David Barnard _____________________________________________________________________________ Scanned by IBM Email Security Management Services powered by MessageLabs. For more information please visit http://www.ers.ibm.com _____________________________________________________________________________ ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users