This is a strange one. And geeky too. None geeks look away now.
Microsoft doesn’t provide a simple mechanism to list the versions of the .Net Framework that are installed. You can find out from the registry, but in a corporate environment, where such apps are locked down, even when you have local admin rights, this can be a bit of a pain.
Especially as when you are writing Windows applications in Visual Studio, you must specify the target framework version. There are various ways around this, different shenanigans you can employ, some listed here.
The simplest approach though, if you can control the target machines, is to know which version is installed and install the required one if needed.
I have compiled a small console utility to list the versions, by querying the registry. I take no credit for the code, it is almost a straight copy from MSDN.
Download it here.
Full source code is here.