I have an AI project that calls 11 custom actions on install, and 5 on uninstall. All of these CAs are "Call method from .NET assembly". All assemblies are compiled for "AnyCPU" so can work with whichever .NET Runtime (i.e. 32 or 64bit) is installed on the target computer.
However, I am stuck on how to set the "64-bit" checkbox against each CA in AI project.
If I leave 64-bit unticked then installing on a 64-bit Win10 with ".NET Runtime (x64)" installed then the installation fails to run the CA, saying "Failed to detect.Net Core runtime install location". Ok so, I tick the 64-bit checkbox and it installs successfully to that environment.
But it now won't install on 32-bit Win10 with ".NET Runtime (x86)" installed ... saying "Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor"
As a possible workaround I'm considering duplicating the 16 CAs - making 16 with the 64-bit flag unticked and 16 with it ticked. And controlling at install/uninstall time which of the CAs are called using a condition. The condition will have to be populated based on which .Net Runtime (x86 or x64) is detected.
Before I do, can I ask is this the only solution available to me? Or is there a simpler way to support the use of "Call method from .NET assembly" CAs across 32 and 64-bit platforms?