【发布时间】:2015-09-05 04:24:33
【问题描述】:
我尝试向安装程序项目添加自定义操作。我使用以下代码添加了一个自定义操作项目:
public class CustomActions
{
[CustomAction]
public static ActionResult CustomAction1(Session session)
{
session.Log("Begin CustomAction1");
return ActionResult.Success;
}
}
在我的安装程序项目中,我添加了对 CustomAction_project 的引用,并将以下条目添加到自定义操作 -> 安装:
名称:CustomAction 的主要输出(活动) 入口点:CustomAction1 安装程序类:假 SourcePath:CustomAction.dll 的路径
现在,如果我尝试构建我的安装程序项目,我会收到以下错误:
错误:在模块中找不到入口点“CustomAction1” 'PATH\CustomAction.dll' 用于自定义操作'主要输出来自 CustomAction (Active)'。
我做错了什么?自定义操作代码由 Visual Studio 2013 自动生成!
【问题讨论】:
标签: c# windows windows-installer installation custom-action