sometimes a custom action fails with the following exception:
Code: Select all
SFXCA: Extracting custom action to temporary directory: C:\Windows\Installer\MSI31337.tmp-\
SFXCA: Binding to CLR version v4.0.30319
Calling custom action Installer.CustomAction!Installer.CustomAction.CustomAction.DoSomething
CA__ (DLL) DoSomething: CA__BEGIN ...
Exception thrown by custom action:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
bei System.Collections.Generic.Dictionary`2.get_Item(TKey key)
bei Microsoft.Deployment.WindowsInstaller.CustomActionData.get_Item(String key)
bei Installer.CustomAction.CustomAction.DoSomething(Session session)
--- End of the inner exception stack trace. ---
bei System.RuntimeMethodHandle.InvokeMethod(Object target, Object arguments, Signature sig, Boolean constructor)
bei System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object parameters, Object arguments)
bei System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture)
bei Microsoft.Deployment.WindowsInstaller.CustomActionProxy.InvokeCustomAction(Int32 sessionHandle, String entryPoint, IntPtr remotingDelegatePtr)
CustomAction CA__DoSomething returned actual error code 1603 but will be translated to success due to continue marking
Action ended 13:33:37: CA__DoSomething. Return value 1603.ProductName=[ProductName];ProductVersion=[ProductVersion];AppDir=[SETUPEXEDIR]
Stage of the custom action is between "Paths Resolution" and "Preparing".
Inside the action following parameters are retrieved:
session.CustomActionData["AppDir"], session.CustomActionData["ProductName"], session.CustomActionData["ProductVersion"]
How can this happen?
Thank you,
/dev/null
FOLLOW US
Get the latest news in Application Packaging