I have very simple managed CA which uses Microsoft.Deployment.WindowsInstaller:
[CustomAction]
public static ActionResult TestDtf(Session session)
{
MessageBox.Show("Test");
ActionResult result = ActionResult.Success;
return result;
}
I compile this with net4. I have a Managed CA in InstallShield2012 'stored in binary table' with method signature method=TestDtf, arguments=value:MsiHandle,Parameter:Microsoft.Deployment.WindowsInstaller
I'm not sure I'm calling this right, but even this isn't my immediate problem. The problem seems to be that msiexec only looks in the system folder for Microsoft.Deployment.WindowsInstaller.dll, instead of somewhere like the folder where I have just installed this assembly and confirmed it is there after CopyFiles.
Here is partial log:
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)
If I manually drop the Microsoft.Deployment.WindowsInstaller.dll into syswow64, it loads fine. Not sure I want to install this to our clients system folder however...
How do I set up my installer so that it can find Microsoft.Deployment.WindowsInstaller.dll?