如何判断正在运行的应用程序在XP上加载了哪些.NET CLR版本?
问题描述:
我知道在计算机上有由explorer.exe加载的托管shell扩展。我想知道什么版本的CLR被加载到explorer.exe中。如果我运行Vista或Win7,我可以使用Process Explorer并查看explorer.exe属性的.NET Assemblies选项卡。但是,这在XP上不起作用。有没有办法在XP上获得这个信息?如何判断正在运行的应用程序在XP上加载了哪些.NET CLR版本?
答
不进程资源管理器也显示已加载的DLL?在该列表中查找mscorwks.dll
,并查看它从哪里加载。 (这是工作站版本 - 我不记得服务器版本是什么,但是我不认为你会在XP上看到它,以mscor
作为第一个近似值。)
答
如果您在目标计算机上安装了Visual Studio,则可以使用Visual Studio Command Prompt中的clrver
<pid>
来查看进程中加载的CLR的版本。
例如:
C:\>clrver 4900
v2.0.50727
这表明随着PID 4900的方法具有加载.NET 2。
C:\>clrver -h
Displays CLR versions
Usage: clrver [-?|-all|<PID>]
-all - Displays all processes on the machine using the CLR.
<PID> - Displays the version of the CLR used by the specified process.
-? - Displays this help screen.
If called with no options, clrver will display all installed CLR versions.
哦,很酷。因此,如果我搜索“mscorwks”,并在结果中列出“explorer.exe”,并且在Handle或DLL下显示路径C:\ Windows \ Microsoft.NET \ Framework \ v2.0.50727,那么这意味着明确指出它使用CLR v2.0.50727? – 2010-12-02 16:14:55