如何执行与依赖关系的WiX的自定义操作DLL文件 [英] How to execute a WiX custom action DLL file with dependencies

查看:316
本文介绍了如何执行与依赖关系的WiX的自定义操作DLL文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建依赖于第三方 .NET DLL(在这个CustomAction C#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?

推荐答案

DTF在WiX的工具集有一个机制,包括自定义操作装配及其所有引用到一个单一的二进制文件(个体经营-extracting 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文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆