编程方式检查所安装的.NET Compact Framework的版本

问题描述:

我有一个针对.NET CF 1.0内置了Windows Mobile应用程序。这是写在C#。如何解决这个程序检查安装运行它在设备上是什么.NET Compact Framework的版本?

I have a Windows Mobile application that is built for .NET CF 1.0. It is written in C#. How can this program check what versions of the .NET Compact Framework are installed on the device it is running on?

这真的取决于你的意思是装什么。如果他们通过CAB文件(最常见)安装,就会出现下 HKEY_LOCAL_MACHINE\Software\Microsoft\.NETCompactFramework 注册表项,你可以以编程方式检查

It really depends on what you mean by "installed". If they were installed via CAB file (the most common), there will be entries in the registry under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETCompactFramework that you could programmatically check.