How to execute a WiX custom action DLL file with dependencies
c#, custom-action, wix
Solution
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.
Problem
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> ``` Do I need to install the third-party DLL file (`MySql.Data.dll`) in order to get the custom action to run? Can I just add another Binary tag with the third-party DLL file?