Hi, While I was looking at refactoring our wxs code, I noticed something odd.
I have a structure like this File\File.wixproj File.wxs Install\Install.wixproj Product.wxs CustomAction1.wxs CustomAction2.wxs InstallExecuteSequence.wxs (Note that I'm using an over-simplified example here, I'm not actually limiting myself to 1 CA per file - that would be ludicrous. Instead, I'm grouping related CAs together. The point is that I've been defining actions in a wxs, and the sequence in another wxs). The Install.wixproj (which emits an MSI) references File.wixproj (which emits a .wixlib) and includes the componentgroup it contains in a feature - all good. However, the custom actions and sequence definition in CustomActionxxx.wxs and InstallExecuteSequence.wxs do not get imported - I just get the default InstallExecuteSequence and no CustomAction table to speak of. I know this is expected behaviour, as described in Bob's comment: http://sourceforge.net/p/wix/bugs/1457/#5b62 *For a fragment to be linked requires that something "higher" in the chain, > starting with your Product/Merge/Patch, to refer to a > **symbol in the fragment. If nothing does, the fragment is excluded at > link time. The way most WiX CAs are authored, there's one fragment that > contains the custom action and its InstallExecuteSequence scheduling, so a > CustomActionRef will cause both to be linked in. If that's what you're > doing, please re-open the bug and attach a sample so we can help.* * * Clearly I should be doing something like this instead: * * Install\Install.wixproj Product.wxs CustomAction1AndSequence.wxs CustomAction2AndSequence.wxs So this raises a couple of other questions related to best practices. How do we handle sequencing? This structure suggests that the two custom actions don't know about each other, so how we specify which comes first. If there's no dependencies between the two actions, should they both simply declare that they need to come after an action that they do depend on, say InstallFiles? What would the sequence be? Would the sequence be inconsistent? Would it give me duplicate sequence numbers (and the ICE warnings that go with them)? And if one of them does require the other, how do we handle that? Can I just reference the name in the sequencing? (I think I can - we have sequencing and CA definitions spread across multiple files now, and it works fine, so referencing CA1 from the sequence definition for CA2 would probably work as well) Also, in this case the answer might be to simply include them in the same file anyway. Finally, since the sequence is spread out over multiple wxs files, how do you get a view of the actual sequence? Is this just a case of opening orca and seeing what's in the table? Any advice would be appreciated! Thanks ------------------------------------------------------------------------------ Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with <2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1 _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users