.NET Versions

There are a couple of things to note with this, however the first point is figuring out which version you have, so see How to: Determine Which .NET Framework Versions Are Installed for some information on this. Make sure you do this carefully though, there is a subtle difference between v4 and v4.0 where the former should be used. I have also looked at System.Environment.Version.toString() (see Environment.Version Property (System)) but this does not seem reliable as when I target 4.5.1 it showed 4.0 and when I target 3.5 it shows 2.0!

It is also worth understanding which versions of .NET run on which operating systems, the latest is available at .NET Framework System Requirements, if you need to see about what .NET 4 runs on, or something older, then use the aforementioned page and change the version under "Other Versions" at the top of the page.