Hello,
It could be helpful if AI notified me during the build process that using "Call function from installed DLL" with the following settings:
Execution Time: Immediately
Execution Stage Condition: Install
Install Execution Stage: between Add Resources and Finish Execution
That the custom action may not work because the target DLL was not installed yet.
I mention these settings because they are the default setting that were selected when I chose "Call function from installed DLL" .
We already have this on our TODO list and this feature will be available in a future version of Advanced Installer.
Thank you for your suggestion.
The next problem I ran into was following the directions for "How do I create fully fledged C# custom actions?" that my custom action DLL was referencing a COM object and the CustomAction1.CA.dll did not contain the DLL generated by Visual Studio for the COM object Interop.COMStuff.dll. I needed to copy the Interop.COMStuff.dll to a new folder and reference the binary dll instead of the COM reference to get the CustomAction1.CA.dll to include the Interop.COMStuff.dll. This is not an AI issue, rather a Visual Studio and/or WiX issue, but may still happen to other users.
Thank you for sharing this with us. This certainly will help future users in the same situation.
I did finally get my C# custom action to work by either using "Call function from installed DLL" or ".NET Installer Class action" is one method the preferred way?
There is no method preferred instead of the other one. It depends about your specific scenario, which one suit you most.
When using ".NET Installer Class action" I noticed that 2 custom actions were created for 64-bit and not 64-bit.
Do I need to keep both, or can I keep just one and remove the VersionNT64 Condition?
This is happening when an assembly is set to “Any CPU”. You can delete one of them but you need to reconfigure the remaining custom action(e.g. execution condition and custom action parameters) so it can run on all platforms.
A minor note, I noticed when using "Call function from installed DLL" with CustomAction1.CA.dll, that a folder is created CustomAction1.CA.dll- that contains the contents of the CustomAction1.CA.dll file, and the contents of the CustomAction1.CA.dll- folder are deleted, but the folder CustomAction1.CA.dll- is never removed. After installing several updates I see several empty folders CustomAction1.CA.dll-1, CustomAction1.CA.dll-2 remaining. Should these folders get deleted during the install process after their contents are removed?
I'm not sure why you encountered this behavior. Can you please send us the .AIP (project file) and a
verbose log of the installation to
support at advancedinstaller dot com so we can investigate it? If it contains confidential information you can send us a small test project which reproduce this behavior.
Best regards,
Dan
FOLLOW US
Get the latest news in Application Packaging