title: Unable to run Wix Custom Action in MSI
body: <p>I'm trying to create a custom action for my Wix install, and it's just not working, and I'm unsure why.</p>
  
  <p>Here's the bit in the appropriate Wix File:</p>
  
  <pre><code>&lt;Binary Id="INSTALLERHELPER" SourceFile=".\Lib\InstallerHelper.dll" /&gt;
  &lt;CustomAction Id="HelperAction" BinaryKey="INSTALLERHELPER" DllEntry="CustomAction1" Execute="immediate" /&gt;
  </code></pre>
  
  <p>Here's the full class file for my custom action:</p>
  
  <pre><code>using Microsoft.Deployment.WindowsInstaller;
  
  namespace InstallerHelper
  {
    public class CustomActions
    {
      [CustomAction]
      public static ActionResult CustomAction1(Session session)
      {
        session.Log("Begin CustomAction1");
  
        return ActionResult.Success;
      }
    }
  }
  </code></pre>
  
  <p>The action is run by a button press in the UI (for now):</p>
  
  <pre><code>  &lt;Control Id="Next" Type="PushButton" X="248" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" &gt;
        &lt;Publish Event="DoAction" Value="HelperAction"&gt;1&lt;/Publish&gt;
    &lt;/Control&gt;
  </code></pre>
  
  <p>When I run the MSI, I get this error in the log:</p>
  
  <pre><code>MSI (c) (08:5C) [10:08:36:978]: Connected to service for CA interface.
  MSI (c) (08:4C) [10:08:37:030]: Note: 1: 1723 2: SQLHelperAction 3: CustomAction1 4: C:\Users\NATHAN~1.TYL\AppData\Local\Temp\MSI684F.tmp 
  Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor.  Action SQLHelperAction, entry: CustomAction1, library: C:\Users\NATHAN~1.TYL\AppData\Local\Temp\MSI684F.tmp 
  MSI (c) (08:4C) [10:08:38:501]: Product: SessionWorks :: Judge Edition -- Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor.  Action SQLHelperAction, entry: CustomAction1, library: C:\Users\NATHAN~1.TYL\AppData\Local\Temp\MSI684F.tmp 
  
  Action ended 10:08:38: SQLHelperAction. Return value 3.
  DEBUG: Error 2896:  Executing action SQLHelperAction failed.
  The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2896. The arguments are: SQLHelperAction, , 
  </code></pre>
  
  <p>Neither of the two error codes or messages it gives me is enough to tell me what's wrong.  Or perhaps I'm just not understanding what they're saying is wrong.</p>
  
  <p>At first I thought it might be because I was using Wix 3.5, so just to be sure I tried using Wix 3.0, but I get the same error.</p>
  
  <p>Any ideas on what I'm doing wrong?</p>