Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
489 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...