1

In order to simulate the "regasm file.dll /codebase" execution during Install, we run Heat.exe on the file.dll we want to add to registry. Then we add the generated content to our installer.wxs file, and everything works.

We would like to automate the process, so that we don't have to manually run Heat.exe each time the .dll file is changes. Instead, the call will be executed each time we build the Wix project.

How can we do it? A code example will be much appreciated.

Thanks, Maxim

Maxim
  • 15
  • 6

2 Answers2

2

Are you sure you even need to do this? We have a bunch of ComVisible(true) assemblies in our installer and we did Heat once and never had to do it again. Previously we were using InstallShield which has a .NET Com Interop setting that does similar steps at build time and it was one of our migration requirements to make sure we'd be ok doing this 1 time only when we switched to WiX.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • The .dll is supposed to be changed many times in the future, so it is likely that we will need to generate the assemblies more than once. – Maxim Nov 15 '10 at 15:40
  • We build the assemblies many times. We only authored it into the installer once as the COM signatures don't change from build to build. – Christopher Painter Nov 15 '10 at 16:04
0

Use heat on the DLL and the TLB to generate DLL.WXI and TLB.WXI files.

Then use something like this in your WXS file to include the XML generated by heat.

<?include DLL.wxi ?>
<?include TLB.wxi ?>
jm.
  • 23,422
  • 22
  • 79
  • 93