Wix 未执行自定义操作

Wix 未执行自定义操作,wix,Wix,CheckUserName和Password是方法名 我的自定义操作根本没有执行。我的自定义操作中有一个消息框;它根本没有显示,而且我正在记录动作的开始和结束。在日志文件中,它也没有显示任何与我的自定义操作相关的内容 我的错误是什么?您在InstallExecuteSequence中引用了它吗 <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"&

CheckUserName和Password是方法名

我的自定义操作根本没有执行。我的自定义操作中有一个消息框;它根本没有显示,而且我正在记录动作的开始和结束。在日志文件中,它也没有显示任何与我的自定义操作相关的内容


我的错误是什么?

您在InstallExecuteSequence中引用了它吗

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Fragment>
      <!-- This is my custom UI where I need to take the user name and password details and perform some checks. If they are empty i need to show message box-->
    <UI>
      <Property Id ="PROP_USER_NAME"  Hidden="yes"/>
      <Property Id="PROP_PASSWORD"  Hidden="yes" />
      <Property Id="PROP_RESULTANT"  Value="1"  />     

      <Dialog Id="UserCredentialDlg" Width="370" Height="270" Title="CQS software" NoMinimize="no">

        <Control Type="Line" Id="TopLine" Width="370" Height="17" X ="0" Y="40"/>
        <Control Type="Line" Id="BottomLine" Width="370" Height="17" X="0" Y="230" />
        <Control Type="PushButton" Id="btnBack" Width="56" Height="17" X="146" Y="244" Text="Back">
          <Publish Event="NewDialog" Value="LicenseDlg"/>
        </Control>
        <Control Type="PushButton" Id="btnNext" Width="56" Height="17" X="221" Y="244" Text="Next" Default="yes">
          <Publish Event="DoAction" Value="UserNameAndPasswordCheck" Order="1"/>
          <Publish Event="NewDialog" Value="WelcomeDlg" Order="2"/>          
        </Control>
        <Control Type="PushButton" Id="btnCancel" Width="56" Height="17" X="296" Y="244" Text="Cancel" Cancel="yes">
          <Publish Event="EndDialog" Value="Exit" />
        </Control>
        <Control Type="Text" Id="lblUserName" Width="50" Height="17" X="79" Y="94" Text="UserName" Transparent="yes"/>
        <Control Type="Text" Id="lblPassword" Width="50" Height="17" X="79" Y="124" Text="Password" Transparent="yes"/>
        <Control Type="Edit" Id="txtbxUserName" Width="150" Height="17" X="131" Y="94"  Property="PROP_USER_NAME" />
        <Control Type="Edit" Id="txtbxpassword" Width="150" Height="17" X="131" Y="124"  Property="PROP_PASSWORD" Password="yes" />
      </Dialog> 
    </UI>
    </Fragment>
  <Fragment>
     <!-- This section is related to custom action-->
    <Binary Id="CABinary" SourceFile=".\CustomActionsFolder\CustomActions.CA.dll" />
    <CustomAction Id="UserNameAndPasswordCheck" BinaryKey="CABinary"  DllEntry="CheckUserNameAndPassword" Execute="immediate"/>
  </Fragment>
</Wix>

否则,它确实不会运行。
希望这有助于

尝试在标记中而不是片段中定义自定义操作和二进制文件。我认为如果在元素中引用它们,它们就不会被正确引用。所以,带有二进制和CustomAction的片段在预处理时被丢弃。
<Binary Id="CABinary" SourceFile=".\CustomActionsFolder\CustomActions.CA.dll" />
<CustomAction Id="UserNameAndPasswordCheck" BinaryKey="CABinary"  DllEntry="CheckUserNameAndPassword" Execute="immediate"/>

<InstallExecuteSequence>
    <Custom Action="UserNameAndPasswordCheck" After="InstallFinalize"/>
</InstallExecuteSequence>