1

When using Wix/Votive to create setup projects with Visual Studio integration, it seems like COM registration is a big hole in the feature set. Both Visual Studio and the integrated Visual Studio setup projects do this almost effortlessly. Wix, on the other hand, makes it positively painful.

During the build process, Votive calls Heat.exe to harvest referenced projects. Why could it not at that point also harvest the registry entries necessary for COM Interop? This would integrate the process into the build and free up developers from this mind-deadening chore. It would also maintain a declarative/data-driven install process.

Has anyone looked into doing something like this? I imagine it would be necessary to edit some of the Wix MSBuild targets, I'm not confident enough with MSbuild to do it myself. I'd be really interested to hear from anyone who's had a stab at it though.

quetzalcoatl
  • 32,194
  • 8
  • 68
  • 107
Tim Long
  • 13,508
  • 19
  • 79
  • 147

1 Answers1

2

I don't believe in dynamically generating components during the build. I've written entire articles on the fragility and non-deterministic behavior of that pattern. Instead I treat my installer source just like the rest of the system and author it up front and check it in for the build to merely compile.

In that situation I use heat to generate the registry data for my COM/COM Visible dll's. Being lazy, I wrote a tiny winforms utility that puts a filesystem watcher on a dirctory and whenever there is a change notification I pass the directory off to heat. I then get heat's output and load it into the winform using an XML editor to provide highlighting. I look at what it wrote and if I like it I copy and paste it into my wxs files.

Updated with URL upon request:

Dealing with very large number of files

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • thank you for your comments. I understand your philosophical position on dynamic generation of installation data, however I respectfully disagree with your opinion. In some situations it is possible to do things declaratively, but in other situations things moust be done dynamically. There is a lot of bigotry on the web surrounding this issue. I don't want to get into a great debate about the relative merits of the two techniques, I really just want an answer to my question. – Tim Long May 04 '11 at 13:57
  • By the way, if you link to your articles I would be interested to read them so I can fully understand your perspective. – Tim Long May 04 '11 at 14:06
  • I was trying to avoid what might be considered spam. – Christopher Painter May 04 '11 at 18:22
  • I'm accepting this answer somewhat belatedly. In the end, I found a way to author the Wix source in such a way that I can produce mostly generic code with an include file containing the variable parts. My aim is to create a template project that can be re-used by other developers who don't necessarily understand Wix. I have had to produce a custom action that performs a registration with a third party framework, not ideal but it can't be done declaratively because the framework forbids directly editing its 'registry' (for want of a better word). – Tim Long Nov 09 '11 at 22:57