Issue with Wix DTF while creating more than one action in a single DTF custom action assembly

StackOverflow https://stackoverflow.com/questions/2339560

  •  22-09-2019
  •  | 
  •  

Question

DTF does not call the second action if the custom action assembly has more than one action. It always calls only the first action. As a workaround, I am using one action in one assembly. It works perfectly always.

Do you have any idea on this issue?

public class CustomActions
{

    [CustomAction]
    public static ActionResult CustomAction1(Session session)
    {
        [some code]
    }


    [CustomAction]
    public static ActionResult CustomAction2(Session session)
    {
        [some code]
    }

}
Was it helpful?

Solution

I've never seen this problem as I group custom actions together in a single assembly all the time. Each method will be exported as type 1 entry points and then you write a custom action for each exported function. Windows Installer calls the CA which calls the function which fires up the CLR and invokes the static method that the custom action points to.

OTHER TIPS

Probably, it will be helpful for some searchers, especially for .Net novices: double check that class and static method of custom action entry is public!

It might seem an obvious thing, but still. When you define a custom actions in your wxs file, do you specify different values in "DllEntry" attribute? This attribute points out a method, which is actually your CA. If you copy/paste custom action definitions, you might just forget to change the DllEntry...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top