Detecting if MSBuild/.net 4 is installed from C# code running on 3.5?
- by Michael Stum
I have an application that is running on .net 3.5 SP1 and that is supposed to check if .net 4 is installed.
Actually, I'm more interested if MSBuild v4 is installed, which would boil down to a simple File.Exists(@"C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe");
However, apart from the fragility of the 4.0.30319 Version (and the Windir, but that's easy to solve), I wonder if there is a more appropriate way, like an API?