Check .NET is installed

Jan 26, 2015 at 11:40 AM
Just played with Wix# installer for the first time and...
I have to say I am impressed by its simplicity! :)
Why can't Microsoft come up with something like that?!

Anyhow I have 2 question:
  1. how can I specify my dependency on .NET4.5
    This is for a general public application, I need to prompt for its installation or exit, if needed...
  2. Same with the WPF sample.
    I notice the WPF sample is a WPF App, which call the MSI API.
    But the WPF App won't run if .NET3.0 is not installed!
    How could I get around that?
Jan 27, 2015 at 12:10 AM
Is per CodeProject answer :)

You need to have a look at <Wix# Samples>\LaunchConditions. It demonstrates how to detect specific version of .NET and make is an installation pre-condition.