tags:

views:

37

answers:

1

I've been working on a tool that creates a UI for authoring wxs files. Currently it's simple code that uses Linq-to-XMl queries to bind the UI to the XDocument and I'm starting the process of refactoring it.

My question is: Are there any classes already in WiX that provide useful functionality? For example something like enumerating a WiXDependencies collection to get back strongly typed information on module signature, language, version and then being able to add/add range/remove and so on. Basically I'm looking to reuse or create an API that can handle all my interaction with the wxs file so my UI layer doesnt have to be aware of all the details.

I've been looking at the classes in the serialize namespace and I see they have interesting members and typically an OutputXml method but it's not obvious to me how you would construct the class and read existing xml into it.

Update: I do now see the CDR class but it only seems to read from a file on not any other sources.

A: 

The WiX toolset does have a CodeDOM that is created from the wix.xsd via the XsdGen.exe tool (code in wix\toolsrc\XsdGen). It was built back in the .NET v1.1 days so I'm not sure how LINQ friendly it is. This might be something we should look at improving in WiX v4.x.

Rob Mensching
Rob- It would be great if WiX provided a LINQ friendly DOM. If WiX already had this it would greatly simplify my work while allowing the WiX team to assert some control over the authoring practices. It could also be cross leveraged for other purposes such as command line utilities for generating and updating wxs files.
Christopher Painter
Yeah, I totally agree. Let's get WiX v3.5 shipped and Burn done then tackle this problem.
Rob Mensching
If someone (more experienced in OOD then me) could put together some class diagrams and interfaces along with a few samples I could volunteer to do the rest of the heavy lifting.
Christopher Painter