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;
}
}
}
So it turns out that although I was using the different .Net version in my CustomAction.config file, but in Custom Action project the targeted .Net version was 4.5. So it was superseding the config properties. Once I reduced it to 3.5, it started working. Thanks everyone for all the suggestion.
I am not an expert on managed code custom action, Chris Painter is the man for this, but let me check a couple of things:
Verbose, debug, logging: See installsite.org on logging. From that content, I would try:
This is full, verbose logging (
*v
) with extra debugging information (x
) and continuous logging (!
) (as opposed to writing the log in batches). The latter makes the install much slower, but assures that no log-buffer is lost due to crashes.Some Links (for safekeeping):