I found a solution in case of using Wix# v 1.0.17.0.
First you need to read and understand very short and clear MSDN article named How to: Determine Which .NET Framework Versions Are Installed.
So, if you need to know if .Net Framework 4.5 is installed you can use this way:
Hope this helps.
First you need to read and understand very short and clear MSDN article named How to: Determine Which .NET Framework Versions Are Installed.
So, if you need to know if .Net Framework 4.5 is installed you can use this way:
project.SetNetFxPrerequisite("NETFRAMEWORK45 >= '#378389'", "Please install .Net 4.5 first");
So, magic number #378389 is a number of release value from windows registry (see short table in article). Code will detect .Net framework 4.5 version and higher and you don't need to check registry manually.Hope this helps.