How to tell what version of the .NET CLR is loaded by a running application on XP?

岁酱吖の 提交于 2019-12-08 06:56:37

问题


I know that there are managed shell extensions loaded by explorer.exe on a computer. I want to know what version of the CLR is loaded into explorer.exe. If I am running Vista or Win7, I can use Process Explorer and look at the .NET Assemblies tab of the properties for explorer.exe. However, this doesn't work on XP. Is there a way to get this info on XP?


回答1:


Doesn't Process Explorer also show the the DLLs that have been loaded? Look for mscorwks.dll in that list, and see where it's being loaded from. (That's the workstation version - I can't remember what the server version is, but I don't imagine you'll see it on an XP box anyway. Look for anything beginning with mscor as a first approximation.)




回答2:


If you have Visual Studio installed on the target computer you can use clrver<pid> from a Visual Studio Command Prompt to see what version(s) of the CLR are loaded in a process.

For example:

C:\>clrver 4900
v2.0.50727

This indicates that the process with PID 4900 has .NET 2 loaded.

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.


来源:https://stackoverflow.com/questions/4336889/how-to-tell-what-version-of-the-net-clr-is-loaded-by-a-running-application-on-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!