Maxim
Maxim

Reputation: 15

Wix - How to automate call to Heat on DLL file to receive regasm information

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

Upvotes: 1

Views: 1080

Answers (2)

jm.
jm.

Reputation: 23734

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 ?>

Upvotes: 0

Christopher Painter
Christopher Painter

Reputation: 55601

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.

Upvotes: 2

Related Questions