Friday 22 August 2014

Tuesday 5 August 2014

WIX : Check if the .Net 4.5.1 Framework is installed

You can check if the .Net Framework 4.5.1 is installed using the following instructions in your WIX file:

    
    <PropertyRef Id="NETFRAMEWORK45"/>
    <Condition Message='This setup requires the .NET Framework 4.5.1 installed.'>
      <![CDATA[Installed OR NETFRAMEWORK45 >= "#378675"]]>
    </Condition>

One thing to keep in mind though is that the release number of the .Net 4.5.1 Framework is different with respect to your operating system version.

For example, to check if the .Net 4.5.1 Framework is installed your Windows 2008 R2 Server, you would be using "378758" as the release number. If you are on a Windows Server 2012 R2 machine, the release number to use would be "378675".

See also: How to: Determine Which .NET Framework Versions Are Installed