I have a requirement to permit a WiX installer to install the product only if Framework 4.6 is installed. If this is not the case I display an error message to the user.
This is working fine, but now I must verify that if there is a previous version running in framework 3.5, I must let the user know that Framework 4.6 is required. Somehow my approach is not working. Would appreciate a little help. This is the code I am using in WiX:
<PropertyRef Id="WIX_IS_NETFRAMEWORK_46_OR_LATER_INSTALLED" />
<Condition Message="This application requires .NET Framework 4.6. Please install the .NET Framework then run this installer again.">
<![CDATA[Installed OR WIX_IS_NETFRAMEWORK_46_OR_LATER_INSTALLED]]>
</Condition>
<PropertyRef Id="NETFRAMEWORK35" />
<Condition Message="This application requires .NET Framework 4.6. Please install the .NET Framework then run this installer again.">
<![CDATA[(NETFRAMEWORK35 AND NOT WIX_IS_NETFRAMEWORK_46_OR_LATER_INSTALLED)]]>
</Condition>
And in the CustomAction.config I have:
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" />
<supportedRuntime version="v2.0.50727"/>
</startup>
UPDATE
Changed the Launch Condition to:
<Condition Message="This application requires .NET Framework 4.6. Please install the .NET Framework then run this installer again.">
<![CDATA[(Installed OR (NETFRAMEWORK35 = "#1" AND WIX_IS_NETFRAMEWORK_46_OR_LATER_INSTALLED))]]>
</Condition>
But all the installer does is just display the familiar "Setup Wizard ended prematurely"
%TEMP%
folder when you need it. Sort by modify to find the latest log. – Stein Åsmul