Tag: 自定义动作

WiX CustomActionData在名为CustomAction的位置为空

再一次,我遇到了问题,这可能很容易解决。 我想扩展一个使用WiX创建的设置,以便对已安装程序的配置文件进行更改。 为了做到这一点,我创建了一个CustomAction 。 为了能够更改配置文件,我需要知道它在CustomAction中的(install-)位置。 因此,我尝试将INSTALLLOCATION和Filename传递给我的CustomAction 。 这就出现了问题: CustomActionData -Attribute始终为空,并且安装程序抛出exception。 我的CustomAction是一个C#DLL文件: DemoDatumErzeugen.CA.dll 。 它包含一个修改配置文件的方法DatumEintragen 。 我试图以这种方式访问​​数据: string path = session.CustomActionData[“LOCATION”]; 这是引发exception的地方。 我只收到了德语错误信息,但它说了一句话: The supplied key was not found in the dictionary ( Der angegebene Schlüssel war nicht im Wörterbuch angegeben. )。 这是我尝试将属性从我的setup-script传递到自定义操作的方法: 我已经看过许多例子,它们以相同的方式完成,或者至少非常相似。 我已经尝试了很多东西,但似乎没有什么比在之后改变值帮助。 CustomActionData始终为零。 我检查它: session.CustomActionData.Count 再一次,我非常感谢任何帮助或提示我做错了什么。

使用WiX C#/ .NET 4自定义操作时出现错误2896

我想在WiX中使用我的第一个自定义操作,我得到: 错误2896:执行操作CustomActionTest失败。 我使用的是Visual Studio 2010,WiX 3.5,64位Windows 7旗舰版,.NET Framework 4。 以下是我认为的相关部分: 1 CLIENT_DESC_VALID = “0” CLIENT_DESC_VALID = “1” 从行动: namespace JudgeEditionCA { public class CustomActions { [CustomAction] public static ActionResult CustomActionOne( Session session ) { return ActionResult.Success; } } } 以及自定义操作的配置文件: 最后,我在我的WiX项目中使用了项目引用来进行自定义操作。 我不确定我做错了什么。