How to execute a WiX custom action DLL file with dependencies(如何执行具有依赖关系的 WiX 自定义操作 DLL 文件)
问题描述
我想创建一个依赖于第三方 .NET DLL(在这种特定情况下,它是 MySql.Data.dll
).我有 C# 自定义操作 DLL 文件与下面的 WiX 片段一起使用.我只是想弄清楚如何安全地将依赖项添加到自定义操作中.注意:我实际上并不需要这个第三方 DLL 文件来运行已安装的应用程序.
I want to create a CustomAction C# DLL file that depends on a third-party .NET DLL (in this specific case, it's MySql.Data.dll
). I have the C# custom action DLL file working with the WiX fragment below. I'm just trying to figure out how to safely add a dependency to the custom action. Note: I don't actually need this third-party DLL file file for the installed application to run.
<Binary Id="MyCustomAction.dll" SourceFile="MyCustomAction.CA.dll" />
<CustomAction Id="FixupConfigForMysql" Return="check" />
<InstallExecuteSequence>
<Custom Action='FixupConfigForMysql' After='InstallFiles'>NOT Installed</Custom>
</InstallExecuteSequence>
是否需要安装第三方 DLL 文件 (MySql.Data.dll
) 才能运行自定义操作?
Do I need to install the third-party DLL file (MySql.Data.dll
) in order to get the custom action to run?
我可以在第三方 DLL 文件中添加另一个二进制标签吗?
Can I just add another Binary tag with the third-party DLL file?
推荐答案
WiX 工具集中的 DTF 具有一种机制,可以将您的自定义操作程序集及其所有引用包含到单个二进制文件中(基本上是自解压 dll).我不编写托管的自定义操作(C/C++ 创建的自定义操作具有较少的依赖项并提高了成功率),但它应该只在 VS 中构建时工作.
DTF in the WiX toolset has a mechanism to include your custom action assembly and all of its references into a single binary (self-extracting dll, basically). I don't write managed custom actions (C/C++ creates custom actions with fewer dependencies and increases success rate) but it is supposed to just work when building in VS.
这篇关于如何执行具有依赖关系的 WiX 自定义操作 DLL 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何执行具有依赖关系的 WiX 自定义操作 DLL 文件
基础教程推荐
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30