C# 对CustomAction的未解析引用:WiX中的清理

C# 对CustomAction的未解析引用:WiX中的清理,c#,wix,C#,Wix,当使用dark.exe处理Installshield中的MSI文件时,它会生成一个包含多个错误实例的文件(从Visual Studio 2013生成时): Unresolved reference to symbol 'CustomAction:CleanUp' wxs文件的一部分是: <Dialog Id="SetupCompleteSuccess" X="50" Y="50" Width="374" Height="266" Title="[ProductName

当使用dark.exe处理Installshield中的MSI文件时,它会生成一个包含多个错误实例的文件(从Visual Studio 2013生成时):

Unresolved reference to symbol 'CustomAction:CleanUp'
wxs文件的一部分是:

          <Dialog Id="SetupCompleteSuccess" X="50" Y="50" Width="374" Height="266" Title="[ProductName] - InstallShield Wizard" NoMinimize="yes">
            <Control Id="OK" Type="PushButton" X="230" Y="243" Width="66" Height="17" Text="&amp;Finish" TabSkip="no" Default="yes" Cancel="yes">
                <Publish Event="DoAction" Value="CleanUp">ISSCRIPTRUNNING="1"</Publish>
                <Publish Event="DoAction" Value="LaunchProgramFileFromSetupCompleteSuccess">LAUNCHPROGRAM And PROGRAMFILETOLAUNCHATEND &lt;&gt; "" And NOT Installed</Publish>
                <Publish Event="EndDialog" Value="Exit">1</Publish>
                <Publish Event="DoAction" Value="ShowMsiLog">MsiLogFileLocation And (ISSHOWMSILOG="1") And NOT ISENABLEDWUSFINISHDIALOG</Publish>
            </Control>

ISSCRIPTRUNNING=“1”
LAUNCHPROGRAM和ProgramFileToLaunchAttend“”未安装
1.
MsiLogFileLocation和(ISSHOWMSILOG=“1”)而不是ISENABLEDWUSFINISHDIALOG
使用ORCA查看MSI文件,表中的CustomAction包含一个用于LaunchProgramFileFromSetupCompleteSuccess的条目(不会引发错误)和一个用于清理的条目,因此dark.exe在创建一组CustomActions时表现一致,如下所示:

       <CustomAction Id="ISPreventDowngrade" Error="[IS_PREVENT_DOWNGRADE_EXIT]" />
    <CustomAction Id="ISRunSetupTypeAddLocalEvent" BinaryKey="ISExpHlp.dll" DllEntry="RunSetupTypeAddLocalEvent" />
    <CustomAction Id="ISSelfRegisterCosting" BinaryKey="ISSELFREG.DLL" DllEntry="ISSelfRegisterCosting" />
    <CustomAction Id="ISSelfRegisterFiles" BinaryKey="ISSELFREG.DLL" DllEntry="ISSelfRegisterFiles" Execute="deferred" Impersonate="no" />
    <CustomAction Id="ISSelfRegisterFinalize" BinaryKey="ISSELFREG.DLL" DllEntry="ISSelfRegisterFinalize" />
    <CustomAction Id="ISUnSelfRegisterFiles" BinaryKey="ISSELFREG.DLL" DllEntry="ISUnSelfRegisterFiles" Execute="deferred" Impersonate="no" />
    <CustomAction Id="SetARPINSTALLLOCATION" Property="ARPINSTALLLOCATION" Value="[INSTALLDIR]" />
    <CustomAction Id="SetAllUsersProfileNT" Property="ALLUSERSPROFILE" Value="[%SystemRoot]\Profiles\All Users" />
    <CustomAction Id="setAllUsersProfile2K" Property="ALLUSERSPROFILE" Value="[%ALLUSERSPROFILE]" />
    <CustomAction Id="setUserProfileNT" Property="USERPROFILE" Value="[%USERPROFILE]" />
    <CustomAction Id="ShowMsiLog" Directory="SystemFolder" ExeCommand="[SystemFolder]notepad.exe &quot;[MsiLogFileLocation]&quot;" Return="asyncNoWait" />
    <CustomAction Id="LaunchProgramFileFromSetupCompleteSuccess" BinaryKey="NewBinary19" DllEntry="LaunchProgram" />
    <CustomAction Id="ISPrint" BinaryKey="SetAllUsers.dll" DllEntry="PrintScrollableText" />

如何处理此问题?

查找存在哪个dll“清理”自定义操作,并添加引用

<Binary Id="CleanupBinary" SourceFile="Your location of the CleanUp Dll" />
<CustomAction Id="CleanUp" BinaryKey="CleanupBinary" DllEntry="Your cleanup custom action name" />

查找存在哪个dll“清理”自定义操作,并添加引用

<Binary Id="CleanupBinary" SourceFile="Your location of the CleanUp Dll" />
<CustomAction Id="CleanUp" BinaryKey="CleanupBinary" DllEntry="Your cleanup custom action name" />


如何识别dll中是否存在自定义操作?我应该查看哪些DLL?安装程序是由您创建的。如果是这样,那么我想您可以获得定制操作的源代码。如果它不是由您创建的,请使用“dark-x./yoursInstaller.msi”,它将创建“Binary”文件夹。检查文件夹内是否有任何文件包含“清理”。如果没有清理,那么很抱歉,我帮不了什么忙。有一个二进制文件夹,其中包含19个名为NewBinaryN的文件,其中N的范围从1到19。文件1-18似乎是映像。NewBinary19是一个dll,但似乎用于启动程序。msi文件中CustomAction表中的条目是
LaunchProgramFileFromSetupCompleteSuccess 1 NewBinary19 LaunchProgram
Hi Simon,我正在尝试了解安装程序是如何创建的。出于好奇,您是否尝试使用安装程序进行安装。。成功吗?如果尝试使用Wix cmd工具Candle and Light处理文件,Candle会生成一个.wixobj文件,但Light报告的问题与Visual Studio相同-未解决对符号的引用,因此,我想这就是从VisualStudio生成未解析符号消息的原因。如何识别dll中是否存在自定义操作?我应该查看哪些DLL?安装程序是由您创建的。如果是这样,那么我想您可以获得定制操作的源代码。如果它不是由您创建的,请使用“dark-x./yoursInstaller.msi”,它将创建“Binary”文件夹。检查文件夹内是否有任何文件包含“清理”。如果没有清理,那么很抱歉,我帮不了什么忙。有一个二进制文件夹,其中包含19个名为NewBinaryN的文件,其中N的范围从1到19。文件1-18似乎是映像。NewBinary19是一个dll,但似乎用于启动程序。msi文件中CustomAction表中的条目是
LaunchProgramFileFromSetupCompleteSuccess 1 NewBinary19 LaunchProgram
Hi Simon,我正在尝试了解安装程序是如何创建的。出于好奇,您是否尝试使用安装程序进行安装。。成功吗?如果它尝试使用Wix cmd工具Candle and Light处理该文件,Candle会生成一个.wixobj文件,但Light报告的问题与Visual Studio相同-对符号的未解析引用,因此我猜这就是从Visual Studio生成未解析符号消息的原因。