i got the below code from this site.
because my custom action class name could be different. so please help me to understand how wix will determine where is my custom action method name ? where to declare ?
can i give different name for Custom Actions class instead of __CustomActions __ ?
using System;
using System.Windows.Forms;
using WixSharp;
using Microsoft.Deployment.WindowsInstaller;
class Script
{
static public void Main(string[] args)
{
var project = new Project("CustomActionTest",
new Dir(@"%ProgramFiles%\My Company\My Product",
new DirFiles(@"Release\Bin\*.*")),
new ManagedAction("MyAction"));
BuildMsi(project);
}
}
public class CustomActions
{
[CustomAction]
public static ActionResult MyAction(Session session)
{
MessageBox.Show("Hello World!", "Embedded Managed CA");
session.Log("Begin MyAction Hello World");
return ActionResult.Success;
}
}
my question is how wix will know the MyAction reside in CustomActions class ?because my custom action class name could be different. so please help me to understand how wix will determine where is my custom action method name ? where to declare ?
can i give different name for Custom Actions class instead of __CustomActions __ ?