如何在调试会话中找到调试对象中使用的.NET运行时版本?以自动/脚本方式,不使用调试器扩展或符号?
答案:
!for_each_module .if ( ($sicmp( "@#ModuleName" , "mscorwks") = 0) | ($sicmp( "@#ModuleName" , "mscorsvr") = 0) | ($sicmp( "@#ModuleName" , "clr") = 0)) {.echo @#ProductVersion}
0:000:x86> !for_each_module .if ( ($sicmp( "@#ModuleName" , "mscorwks") = 0) | ($sicmp( "@#ModuleName" , "mscorsvr") = 0) | ($sicmp( "@#ModuleName" , "clr") = 0)) {.echo @#ProductVersion}
4.7.3132.0
1a: Unable to retrieve module names (8007007e)
34: Unable to retrieve module names (8007007e)
87: Unable to retrieve module names (8007007e)
8a: Unable to retrieve module names (8007007e)
9f: Unable to retrieve module names (8007007e)
b0: Unable to retrieve module names (8007007e)
b8: Unable to retrieve module names (8007007e)
c0: Unable to retrieve module names (8007007e)
c1: Unable to retrieve module names (8007007e)
c5: Unable to retrieve module names (8007007e)
cc: Unable to retrieve module names (8007007e)
d2: Unable to retrieve module names (8007007e)