インストールの最後または少なくともファイルがコピーされた後に実行するC#カスタムアクションアセンブリにカスタムアクションがあります。私はインストールの最初の部分でダイアログに入力された情報で設定ファイルを更新する必要があります。これはリモート設定ファイルなので、いくつかの行を更新する必要があります。現在、私は各行項目に対してXmlFileエントリを持っていますが、一般的にはlocalhost:8001を[servername]:[serverport]に置き換えます。私は一般的な検索を見つけていないし、WiXで置き換えるので、私はそれを行うカスタムアクションを書いた。問題は私が走らせることができないことです。カスタムUI(UIシーケンスXMLベロー)を使用しているので、After = "InstallFiles"が機能しない理由が考えられます。WiX Toolsetはファイルコピー後にカスタムアクションを実行します
<InstallUISequence>
<Custom Action="SetInstallFolder" Sequence="1" />
<!--<Custom Action="UpdateRemotingConfigFile" After='InstallFiles' />-->
<Show Dialog="UserExitForm" OnExit="cancel" />
<Show Dialog="FatalErrorForm" OnExit="error"><![CDATA[NOT HideFatalErrorForm]]></Show>
<Show Dialog="MaintenanceForm" Sequence="999"><![CDATA[Installed <> ""]]></Show>
<Show Dialog="ResumeForm" Sequence="998"><![CDATA[Installed="" AND RESUME]]></Show>
<Show Dialog="FinishedForm" OnExit="success" />
<Show Dialog="WelcomeForm" Sequence="1001"><![CDATA[Installed="" AND NOT RESUME]]></Show>
<Custom Action="VSDCA_AllUsers" After="CostInitialize"><![CDATA[Installed="" AND NOT RESUME AND ALLUSERS=1]]></Custom>
</InstallUISequence>
<AdminUISequence>
<Custom Action="SetInstallFolder" Sequence="1" />
<!--<Custom Action="UpdateRemotingConfigFile" After='InstallFiles' />-->
<Show Dialog="UserExitForm" OnExit="cancel" />
<Show Dialog="FatalErrorForm" OnExit="error"><![CDATA[NOT HideFatalErrorForm]]></Show>
<Show Dialog="MaintenanceForm" Sequence="999"><![CDATA[Installed<>""]]></Show>
<Show Dialog="ResumeForm" Sequence="998"><![CDATA[Installed="" AND RESUME]]></Show>
<Show Dialog="FinishedForm" OnExit="success" />
<Show Dialog="WelcomeForm" Sequence="1001"><![CDATA[Installed="" AND NOT RESUME]]></Show>
</AdminUISequence>
私は上記のカスタムアクションのコメントを解除した場合、私は次のエラーを取得する:
error LGHT0094: Unresolved reference to symbol 'WixAction:InstallUISequence/InstallFiles' in section 'Product:{...
私は "FinishedForm" に変更した場合、私は次のエラーを取得する:
error LGHT0177: The AdminUISequence table contains an action 'UpdateRemotingConfigFile' that is scheduled to come before or after action 'FinishedForm', which is a special action which only occurs when the installer terminates. These special actions can be identified by their negative sequence numbers. Please schedule the action 'UpdateRemotingConfigFile' to come before or after a different action.
更新: 私は次のように定義されたカスタムアクションを持っています:
<Binary Id="WebApiSetupHelper" SourceFile="..\WebApiSetupHelper\bin\$(var.Configuration)\WebApiSetupHelper.CA.dll" />
<CustomAction Id="UpdateRemotingConfigFile" BinaryKey="WebApiSetupHelper" DllEntry="UpdateRemotingConfigFile" Return="check" />
カスタムアクションを実行するには何を変更する必要がありますか?
ありがとうございました。
わかりません。現在、私はC#アセンブリで定義されたカスタムアクションを持っています。私は明確にするために上記の質問を更新しました。 –