Wix - 如何自动调用 DLL 文件上的 Heat 以接收高潮信息
为了在安装过程中模拟“regasm file.dll /codebase”执行,我们在要添加到注册表的 file.dll 上运行 Heat.exe。然后我们将生成的内容添加到 installer.wxs 文件中,一切正常。
我们希望使该过程自动化,这样我们就不必在每次 .dll 文件更改时手动运行 Heat.exe。相反,每次构建 Wix 项目时都会执行该调用。
我们怎样才能做到呢?代码示例将不胜感激。
谢谢, 格言
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您确定您需要这样做吗?我们的安装程序中有一堆 ComVisible(true) 程序集,我们进行了一次 Heat 后就再也不用这样做了。以前,我们使用 InstallShield,它具有 .NET Com Interop 设置,在构建时执行类似的步骤,这是我们的迁移要求之一,以确保仅当我们切换到 WiX 时才可以执行此操作 1 次。
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.
使用 DLL 和 TLB 上的热量生成 DLL.WXI 和 TLB.WXI 文件。
然后在 WXS 文件中使用类似的内容来包含 heat 生成的 XML。
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.