James Bateson
James Bateson

Reputation: 1227

WiX/burn - How to add custom attribute to MsiPackage element

The WiX documentation seems to imply that you can add any attribute to an MsiPackage element (http://wixtoolset.org/documentation/manual/v3/xsd/wix/msipackage.html):

Any Attribute (namespace='##other' processContents='lax') Extensibility point in the WiX XML Schema. Schema extensions can register additional attributes at this point in the schema. The extension's CompilerExtension.ParseAttribute() method will be called with the package identifier in contextValues["PackageId"].

The documentation doesn't give any examples or guidance on how is this actually acheived.

Can anyone provide an example of how to add a custom attribute to a MsiPackage element?

Upvotes: 0

Views: 615

Answers (1)

Sean Hall
Sean Hall

Reputation: 7878

You implement a WiX compiler extension, and possibly a binder extension. You can see the source for the core WiX extensions on GitHub. You can see my pull request for adding the bal:PrereqSupportPackage here for an example.

Upvotes: 2

Related Questions