我如何知道故障转储的 CLR 版本?

发布于 2024-07-15 01:54:46 字数 95 浏览 6 评论 0原文

我有一个 .NET 应用程序崩溃的小型转储。 有没有办法使用 Windbg 或其他工具了解故障机器(生成故障转储)的 CLR 版本(例如 mscorwks.dll 的版本)?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

套路撩心 2024-07-22 01:54:54

!EEVersion 应提供 CLR 版本。

!EEVersion should give the CLR version.

油焖大侠 2024-07-22 01:54:54

在 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

或者,在 Visual Studio 中加载转储并使用 Debug | 窗户 | 模块工具窗口显示其中一些信息。


两个不同 .Net 版本的示例,使用 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

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
彼岸花ソ最美的依靠 2024-07-22 01:54:53

在 WinDbg 中:最简单的方法是使用 !eeversion 命令,但如果您需要更多信息,可以使用 lm 命令和 v运行时模块 mscorwks 的详细选项。 如果您使用的是 .NET 4,运行时称为 clr,因此在这种情况下您需要相应地更改命令。

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

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文