无法在MSI中运行Wix自定义操作
发布时间:2020-12-14 04:13:16 所属栏目:Windows 来源:网络整理
导读:我正在尝试为我的Wix安装创建一个自定义操作,它只是不起作用,我不确定为什么. 这是适当的Wix文件中的位: Binary Id="INSTALLERHELPER" SourceFile=".LibInstallerHelper.dll" /CustomAction Id="HelperAction" BinaryKey="INSTALLERHELPER" DllEntry="Cus
我正在尝试为我的Wix安装创建一个自定义操作,它只是不起作用,我不确定为什么.
这是适当的Wix文件中的位: <Binary Id="INSTALLERHELPER" SourceFile=".LibInstallerHelper.dll" /> <CustomAction Id="HelperAction" BinaryKey="INSTALLERHELPER" DllEntry="CustomAction1" Execute="immediate" /> 这是我的自定义操作的完整类文件: using Microsoft.Deployment.WindowsInstaller; namespace InstallerHelper { public class CustomActions { [CustomAction] public static ActionResult CustomAction1(Session session) { session.Log("Begin CustomAction1"); return ActionResult.Success; } } } 该操作由UI中的按钮按下(现在): <Control Id="Next" Type="PushButton" X="248" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" > <Publish Event="DoAction" Value="HelperAction">1</Publish> </Control> 当我运行MSI时,我在日志中收到此错误: MSI (c) (08:5C) [10:08:36:978]: Connected to service for CA interface. MSI (c) (08:4C) [10:08:37:030]: Note: 1: 1723 2: SQLHelperAction 3: CustomAction1 4: C:UsersNATHAN~1.TYLAppDataLocalTempMSI684F.tmp Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action SQLHelperAction,entry: CustomAction1,library: C:UsersNATHAN~1.TYLAppDataLocalTempMSI684F.tmp MSI (c) (08:4C) [10:08:38:501]: Product: SessionWorks :: Judge Edition -- Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action SQLHelperAction,library: C:UsersNATHAN~1.TYLAppDataLocalTempMSI684F.tmp Action ended 10:08:38: SQLHelperAction. Return value 3. DEBUG: Error 2896: Executing action SQLHelperAction failed. The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2896. The arguments are: SQLHelperAction, 它给我的两个错误代码或消息都不足以告诉我什么是错的.或许我只是不明白他们说的是错的. 起初我以为可能是因为我使用的是Wix 3.5,所以为了确保我尝试使用Wix 3.0,但我得到了同样的错误. 关于我做错的任何想法?
对于自定义操作程序集,您需要一个配置文件并将useLegacyV2RuntimeActivationPolicy属性设置为true.确保将配置文件命名为CustomAction.config.如果你不这样做,它将无法工作.我假设您正在运行.NET 4 Framework.
有关详细信息,请参阅here.另外,正如AntonyW已经指出的那样,fuslogvw.exe在这种情况下非常有用. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 如何知道$(window).load();来自jquery的状态
- windows – PSExec如何以SYSTEM用户身份运行应用程序?
- 部署 – MSDeploy是否“足够友好”,或者它可以包装在MSI文件
- 华硕b450m pro gaming/r5 2600超频设置
- windows – 为什么在链接.lib后会出现丢失的dll错误?
- 如何在Windows上设置快速私有Mercurial服务器
- windows – 我的NIC ID是什么?
- 在Windows上创建python 3.5 exe
- 在Nano Server上下载PowerShell文件?
- windows-server-2012-r2 – 如何查看Windows服务器的活动远
推荐文章
站长推荐
- 用ffmpeg捕获Windows屏幕
- windows-server-2003 – IIS 6.0与IIS 7.0
- 局域网代码托管服务端——gitblit在windows系统中
- windows-server-2008 – Windows 7 x64 Ultimate
- windows-server-2012-r2 – 如果WSUS服务器上的磁
- windows – 操作系统崩溃的常见原因
- SYN?cookiesSYN cookies
- Windows NTP服务器A Stratum为2,Windows NTP Ser
- 开源私有云平台 Nano v0.6.1发布 - 新增云主机地
- windows系统以及linux系统的优缺点以及区别
热点阅读