如何判断XP上运行的应用程序加载了哪个版本的.NET CLR?

Jac*_*ith 1 .net version clr-hosting

我知道在计算机上有explorer.exe加载的托管shell扩展.我想知道什么版本的CLR加载到explorer.exe.如果我正在运行Vista或Win7,我可以使用Process Explorer并查看explorer.exe属性的.NET Assemblies选项卡.但是,这不适用于XP.有没有办法在XP上获取此信息?

Jon*_*eet 6

Process Explorer是否也显示已加载的DLL?mscorwks.dll在该列表中查找,并查看从哪里加载.(这是工作站版本 - 我不记得服务器版本是什么,但我不认为你会在XP盒子上看到它.从mscor第一个近似开始寻找任何东西.)


Dan*_*nov 6

如果在目标计算机上安装了Visual Studio,则可以从Visual Studio命令提示符中使用,以查看在进程中加载​​了哪些CLR版本.clrver<pid>

例如:

C:\>clrver 4900
v2.0.50727
Run Code Online (Sandbox Code Playgroud)

这表明使用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.
Run Code Online (Sandbox Code Playgroud)