Managed CustomAction can be defined either in the Wix# script or in the external assembly or C# file. The only requirements for any C# method to be qualified for being Managed CustomAcyion is to have DTF Action signature public static ActionResult MyManagedAction(Session session)
, and be marked with [CustomAction]
attribute.
If Managed CustomAction depends on any assembly, which will not be registered with GAC on the target system such assembly needs to be listed in the ManagedAction.RefAssemblies.
false
and Action.Execute set to Execute.deferred
to allow elevating.