My WiX installer UI is getting error while using the Custom Action. Interesting part is, the installer is working fine in Windows 10 but while launching it on Windows 7, installer is getting interrupted.
From the installer logs, the error code is displayed 2896
.
Googling further the error code, pointed me that it could be the mismatch of .net framework version. So I modified my CustomAction.config
as follows :
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" />
<supportedRuntime version="v3.0" />
<supportedRuntime version="v3.5" />
<supportedRuntime version="v2.0.50727"/>
</startup>
I verified the installed version through using following command :
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP"
is there something else am I missing here ?
EDIT: Here is the custom action code for your reference :
namespace ValidateIP
{
public class CustomActions
{
[CustomAction]
public static ActionResult ValidateIP(Session session)
{
session.Log("Begin ValidateIP");
if (string.IsNullOrEmpty(session["IPVAL"]))
{
session["VALIDIP"] = "0";
}
else
{
session["VALIDIP"] = "1";
}
return ActionResult.Success;
}
}
}