Hi Afshar,
you can do this by using the unmanaged api functions for the .net runtime:
[GetRequestedRuntimeVersion]
http://msdn.microsoft.com/en-us/library/ms231649.aspx
It will show you what runtime your application needs in order to
run successfully on a system. I also recommend you to have a look
at other Hosting (Unmanaged API Reference) Functions/Interfaces
in the documentation.
I made a .NET Pinvoke Translation of the Function, if you want to check
another .NET Exe from your running .NET Application:
[DllImport("mscoree.dll",CharSet=CharSet.Unicode)]
public static extern Int32
GetRequestedRuntimeVersion([In][MarshalAs(UnmanagedType.LPWStr, SizeConst =
260)]string pExe,
[Out]StringBuilder pVersion,
[In] Int32 cchBuffer,
[Out] out Int32 pdwLength);
Regards
Kerem