我有一个custom action我已为我的安装程序定义。安装程序似乎没有运行。自定义操作未运行
这里是在WXS文件中定义的自定义动作的台词:
<CustomAction Id="GetConfigProperties" BinaryKey="GetPropertiesDLL" DllEntry="GetPropertiesFromConfigFile" />
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallInitialize" />
<Custom Action="NewerVersionDetected" After="FindRelatedProducts">NEWERVERSIONDETECTED</Custom>
<Custom Action="GetConfigProperties" After="FindRelatedProducts"></Custom>
. . .
</InstallExecuteSequence>
<Binary Id="GetPropertiesDLL" SourceFile="$(var.LPRCore Installer CBP Helper.TargetDir)\LPRCore Installer CBP Helper.CA.dll" />
我检查与海怪的MSI和相应的条目是在MSI的表。
下面的代码的摘录中CustomActions.cs
文件:
[CustomAction]
public static ActionResult GetPropertiesFromConfigFile(Session session) {
// Output a start message to the install log
session.Log("Begin GetPropertiesFromConfigFile");
. . .
return ActionResult.Success;
}
有在哪里我想看看发生了什么事情的地方代码的一些其他session.Log
声明。
现在,我已启用日志记录。当我在记事本中查看日志文件时,我看不到来自session.Log
的呼叫消息。我也没有看到GetConfigProperties
的提及。看起来,自定义操作根本没有执行。我做错了什么?
不,这是不正确的。如果您省略该条件,则默认为1 –