Some reference (implicit or explicit) needs to be present (whether in source or from a compiler extension) to any one thing (just one is sufficient) from some other already linked-in fragment (the Product/Module/Patch/PatchCreation elements are fragments that are, by definition, already linked in) or the linker will ignore them as unneeded code.
>From your example, a PropertyRef would be sufficient to include the entire fragment, but you would need to conditionally include those PropertyRefs by somehow incorporating your filter as a build environmental input to your code to build similar to the way you want to. -----Original Message----- From: Erik Garcia [mailto:gegar...@gmail.com] Sent: Tuesday, September 08, 2009 5:36 PM To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] Yet Another 'Fragment's Question Is there anyway to push in a fragment at link time without the main WXS file containing explicit references to elements in the fragment? I've got many wxs sources generated at build time that I'd like to not muck about with. I was hoping that I could include a CA and some properties simply by linking in the .wixobj at compile time instead of having to place CustomActionRefs and PropertyRefs in half of a truckload of files. Here's a contrived example of what I'm trying to do in the fragment... http://pastebin.com/m34410d2e ...and when I compile product.wixobj and fragment.wixobj, nothing from the fragment gets pulled in. The primary motivation is to conditionally compile in a fragment if when compiling each product WXS, the file matches a filename filter. (oversimplified example) ===== listOfProducts = (productA, productB, productC) `candle.exe productB.specialFragment.wxs` //which yields productB.specialFragment.wixobj for ( baseName : listOfProducts ) candle.exe baseName.wxs //where these have all been generated by a build process light.exe sourceFileBaseName*wixobj //where for productB, the special fragment will be included ===== Many Thanks, -Erik Garcia ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users