I have a custom table defined in a <Fragment>
that I want to link into the main .wxs file. My question is similar to this question, but my fragment does not have a <CustomAction>
tag to refer to, and there is no <CustomTableRef>
tag to use in the main file.
Is the only way to pull in a <Fragment>
that does not have a <...Ref>
able tag to inject a dummy tag that can be Ref
'd? -- e.g. a <Component>
with a "never-install" condition, or a <CustomAction>
that never gets scheduled to run (or does something totally benign like setting property Foo
to ""
)?
I am looking for a recommended best practice. Thanks!
When using references, the entire fragment is consumed. Are you defining a custom table simply to be documentation / metadata regarding the MSI or are you actually using it in a data driven custom action? Typically I would define the custom action and custom table schema in a single fragment so that when someone references the custom action they get the supporting infrastructure. Other fragments can then contain the actual data for said custom table ( implementation specific ).
In your fragment you can create a property like so:
Then reference that fragment in your source like so:
That should pull in the contents of the fragment.