How can I know the CLR version of a crash dump?

纵然是瞬间 提交于 2019-12-01 00:24:23

问题


I have a minidump crashed from a .NET application. Is there any way to know the CLR version (e.g. version of mscorwks.dll) of the fault machine (which generates the crash dump) using either Windbg or some other tool?


回答1:


In WinDbg: the easiest way is to use the !eeversion command, but if you want additional info you can use the lm command with the v verbose option for the runtime module mscorwks. If you're on .NET 4 the runtime is called clr, so in that case you need to change the command accordingly.

0:026> lm vm mscorwks
start    end        module name
79e70000 7a3ff000   mscorwks T (no symbols)           
    Loaded symbol image file: mscorwks.dll
    Image path: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
    Image name: mscorwks.dll
    Timestamp:        Wed Oct 24 09:41:29 2007 (471EF729)
    CheckSum:         00597AA8
    ImageSize:        0058F000
    File version:     2.0.50727.1433
    Product version:  2.0.50727.1433
    File flags:       0 (Mask 3F)
    File OS:          4 Unknown Win32
    File type:        2.0 Dll
    File date:        00000000.00000000
    Translations:     0000.04b0 0000.04e4 0409.04b0 0409.04e4



回答2:


!EEVersion should give the CLR version.




回答3:


Go verbose in WinDbg:

>lm v 
............. (lots of modules).......

687d0000 68d06000   System_Xml_ni   (deferred)             
Image path: C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Xml\38b9d09539b67b08ee996db6c71f8a9b\System.Xml.ni.dll
Image name: System.Xml.ni.dll
Has CLR image header, track-debug-data flag not set
Timestamp:        Mon Oct 06 20:43:49 2008 (48EADAF5)
CheckSum:         00000000
ImageSize:        00536000
File version:     2.0.50727.3074
Product version:  2.0.50727.3074
File flags:       0 (Mask 3F)
File OS:          4 Unknown Win32
File type:        2.0 Dll
File date:        00000000.00000000
Translations:     0409.04b0
CompanyName:      Microsoft Corporation
ProductName:      Microsoft® .NET Framework
InternalName:     System.Xml.dll
OriginalFilename: System.Xml.dll
ProductVersion:   2.0.50727.3074
FileVersion:      2.0.50727.3074 (QFE.050727-3000)
FileDescription:  .NET Framework
LegalCopyright:   © Microsoft Corporation.  All rights reserved.
Comments:         Flavor=Retail

Alternatively, load the dump in Visual Studio and use the Debug | Windows | Modules toolwindow to display some of this info.


Examples for two different .Net versions, using the version information of clr.dll:

.Net 4.0(.x?)

Image name: clr.dll
Timestamp:        Thu Mar 18 21:39:07 2010 (4BA21EEB)
...
File version:     4.0.30319.1
Product version:  4.0.30319.1

.Net 4.5.2

Image name: clr.dll
Timestamp:        Fri Nov 07 20:09:21 2014 (545CA861)
...
File version:     4.5.27.0
Product version:  4.0.30319.0


来源:https://stackoverflow.com/questions/673542/how-can-i-know-the-clr-version-of-a-crash-dump

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