I am writing a custom installer in C#.
Can you tell me an easy way to check if the machine has .NET version installed [even 2.0].
In cases where it is not installed, my app doesn't even start.
Thanks
MSDN has a blog post with sample code to detect if .NET 3 is installed.
[Edit: As mentioned by Stephen Clearly, the author of the blog post also released a tool that can be easily wrapped in a custom installer (and supports all .NET versions)]
Otherwise:
You could always use the file system and check in the %systemroot%\Microsoft.NET\Framework folder.
This will tell you if the following release versions of .NET are installed
I don't know what is your custom installer, but you could use a Setup and Deployment Project in Visual Studio where you can define .NET Framework launch condition.