Microsoft.Deployment.WindowsInstaller を使用する非常に単純なマネージド CA があります。
[CustomAction]
public static ActionResult TestDtf(Session session)
{
MessageBox.Show("Test");
ActionResult result = ActionResult.Success;
return result;
}
これをnet4でコンパイルします。InstallShield2012 に「バイナリ テーブルに格納された」マネージド CA があり、メソッド シグネチャ method=TestDtf、arguments=value:MsiHandle,Parameter:Microsoft.Deployment.WindowsInstaller を使用しています。
私がこれを正しく呼んでいるかどうかはわかりませんが、これでさえ当面の問題ではありません。問題は、msiexec が、このアセンブリをインストールしたばかりのフォルダーのような場所ではなく、Microsoft.Deployment.WindowsInstaller.dll のシステム フォルダーのみを検索し、それが CopyFiles の後に存在することを確認したことです。
ここに部分的なログがあります:
InstallShield: Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Deployment.WindowsInstaller, Version=3.0.0.0, Culture=neutral, PublicKeyToken=ce35f76fcda82bad' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Deployment.WindowsInstaller, Version=3.0.0.0, Culture=neutral, PublicKeyToken=ce35f76fcda82bad'
at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
at System.Reflection.RuntimeMethodInfo.FetchNonReturnParameters()
at System.Reflection.RuntimeMethodInfo.GetParameters()
at InstallShield.ClrHelper.CustomActionHelper.PrepareParameters(EntryPointInfo info, Boolean& anyHidden)
Microsoft.Deployment.WindowsInstaller.dll を手動で syswow64 にドロップすると、正常に読み込まれます。これをクライアントのシステムフォルダーにインストールするかどうかはわかりませんが...
Microsoft.Deployment.WindowsInstaller.dll を検出できるようにインストーラーをセットアップするにはどうすればよいですか?