c# - Unable to schedule my WiX Custom Action into the msi -


i have installer solution in visual studio contains c# windows application bootstrapper, , 2 msi projects. want schedule custom action 1 of 2 msis run during uninstall sequence - first added customactions projects same solution (called "customactions"), has customaction.cs file defines custom function scheduled. function should write log file now:

namespace customactions {     public class customactions     {         [customaction]         public static actionresult uninstallsecondarymsi(session session)         {             session.log("begin customaction1");          /* search productcode of secondary msi here; run msiexec uninstall */              return actionresult.success;         }     } 

i added customactions project reference msi project, , added following product.wxs:

    <!-- custom actions -->     <fragment>       <binary id="customactiondll" sourcefile="$(var.customactions.targetdir)\customactions.ca.dll" />       <customaction id="customaction_getregistrykey"         binarykey="customactiondll"         dllentry="uninstallsecondarymsi"         execute="immediate"         return="check" />      <installexecutesequence>       <custom action="customaction_getregistrykey"               after="installfinalize"></custom>     </installexecutesequence>   </fragment> 

i ran bootstrapper triggers msi, "begin customaction1" string not in log file. thought maybe wasn't logging properly, when viewed generated msi orca.exe, saw custom action was not scheduled under customactions table or installexecutesequence table.

is there i'm missing here? guessed path customactions.ca.dll wasn't correct , tried hard-coding path dll, did not work either. appreciated, in advance!

ah, custom actions elements in main product.wxs file in different fragment, , fragment wasn't getting referred anywhere. put in componentgroup under fragment , made reference id under feature element - , worked. apologies.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -