For the end-user, the easiest way to find the .Net CF version installed on Windows Mobile prior to WM6, is using the “Remove programs” option in the device “Settings” menu. In the list of software installed on your device you can find the .Net CF including the version. If you cannot find the Microsoft .Net Compact Framework there, it’s not installed on your device. Please be careful and do NOT uninstall .Net CF accidentally.
Some devices (i.e. Windows Mobile 6 devices) have .Net CF included on ROM (out of the box). On those devices the previous method cannot help. The best end-user method to detect the .Net CF version on your device is using “cgacutil.exe”. You can find this app using a file explorer in the “\Windows” folder on your device. Running “cgacutil.exe” you’ll see the .Net CF versions installed on your device (i.e. a message showing [3.5.7121.0, 2.0.7045.0] means your device have .Net CF 3.5 Beta 2 and 2.0 SP2). If you cannot find “cgautil.exe” on your device, .Net CF is not installed.
If you’re a developer, probably you’ll need a way to programmatically detect if .Net CF is installed and/or what version is installed on the device. To check if .Net CF is installed, you can use kind of a native code installer, and look on the device registry for the following Key:
[HKEY_LOCAL_MACHINE\Software\Microsoft\.NETCompactFramework]
You’ll find a dword value for each .Net CF version installed on your device with the version as the name (i.e. two dword values named “3.5.7121.0” and “2.0.7045.0”). The value can be “1” or “0”. A “1” value means the version is installed on ROM and a “0” value means it has been installed manually and can be uninstalled. If you cannot find the registry key or any value in there, the .Net CF is not installed on the device.
Finally, from your .Net CF application you can detect the current version using:
Environment.Version
In a device with several .Net CF versions installed, you can also configure your application to run on a specific version. Take a look at this article to learn a little bit more about it.
What about friendly version names? Here you have a list of .Net CF versions:
- 1.0.2268.0: 1.0 RTM
- 1.0.3111.0: 1.0 SP1
- 1.0.3226.0: 1.0 SP2 (Recalled)
- 1.0.3227.0: 1.0 SP2 Beta
- 1.0.3316.0: 1.0 SP2 RTM
- 1.0.4177.0: 1.0 SP3 Beta
- 1.0.4292.0: 1.0 SP3 RTM
- 2.0.4037.0: 2.0 May CTP
- 2.0.4135.0: 2.0 Beta 1
- 2.0.4317.0: 2.0 November CTP
- 2.0.4278.0: 2.0 December CTP
- 2.0.5056.0: 2.0 Beta 2
- 2.0.5238.0: 2.0 RTM
- 2.0.6103.0: 2.0 SP1 Beta
- 2.0.6129.0: 2.0 SP1 RTM
- 2.0.7045.0: 2.0 SP2 RTM
- 3.5.7066.0: 3.5 Beta 1
- 3.5.7121.0: 3.5 Beta 2