Microsoft.Diagnostics.Runtime 0.8.31-beta

CLR Memory Diagnostics (ClrMD)

ClrMD is a set of advanced APIs for programmatically inspecting a crash dump of a .NET program much in the same way that the SOS Debugging Extensions (SOS) do. This allows you to write automated crash analysis for your applications as well as automate many common debugger tasks. In addition to reading crash dumps ClrMD also allows supports attaching to live processes.

This is a prerelease version of Microsoft.Diagnostics.Runtime.
There is a newer version of this package available.
See the version list below for details.

Requires NuGet 2.5 or higher.

Install-Package Microsoft.Diagnostics.Runtime -Version 0.8.31-beta
dotnet add package Microsoft.Diagnostics.Runtime --version 0.8.31-beta
<PackageReference Include="Microsoft.Diagnostics.Runtime" Version="0.8.31-beta" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Microsoft.Diagnostics.Runtime --version 0.8.31-beta
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

Since the last release, I have made two major changes to the API.

First, I have reworked the SymbolLocator class.  I had to rush out the last version so that we could ship sources, and that class was in an incomplete state.  It has been subsequently reworked into a new design.

Second, as part of the effort to (finally) release 1.0 of the library and get it out of beta (which hasn't happened yet), I have marked some commonly used APIs with the [Obsolete] attribute.  Virtually no functionality has been removed, only that APIs have been renamed or moved within the runtime.  The one exception is that ClrMD is moving away from doing symbol resolution (File and Line number).  This means GetSourceLocationForOffset and related functions no longer work.  Instead, I have implemented a sample you can find here:

Note that all methods marked [Obsolete] will be removed in the next NuGet release (but I do not plan to do another release for a little while).  I appologize in advance for any incovenience this causes.  After years of active development, some API dead-ends have inevitably crept into the library, and need to be removed before 1.0 is released.

Aside from various bugfixes, here are some noteworthy changes in this release:

1.  I've added Async APIs for symbol resolution/download, and the SymbolLocator class is now thread safe.  You can now download symbols asynchronosly and in parallel.
2.  Added basic support for converting CLR internal structures (MethodDescs, MethodTables, EEClass, etc) to and from ClrMD types and methods.
3.  Add a way to get information about the Shared and System domains.
4.  Completely remove the dependency on msdia120.dll and DiaLib.dll.  Added a managed PDB reader to do this work instead.  ClrMD currently has no dependencies on any other library (that doesn't come with windows anyway).


This package has no dependencies.

Showing the top 10 GitHub repositories that depend on Microsoft.Diagnostics.Runtime:

Repository Stars
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
.NET debugger and assembly editor
Mono open source ECMA CLI, C# and .NET implementation.
Powerful .NET library for benchmarking
PerfView is a CPU and memory performance-analysis tool
A fast, powerful, CommonMark compliant, extensible Markdown processor for .NET
Port of LMAX Disruptor to .NET
Contains samples and documentation for libraries and tools of the .NET framework. Pull requests welcome!
SharpLab (previously known as TryRoslyn)
Dump and analyze .Net applications memory ( a gui for WinDbg and ClrMd )

Version History

Version Downloads Last updated
1.1.35902 646 7/9/2019
1.1.35504 190 7/5/2019
1.0.5 76,913 3/19/2019
1.0.3 4,092 2/13/2019
1.0.2 7,067 12/17/2018
1.0.0 4,276 11/22/2018
0.9.180305.1 215,455 3/6/2018
0.9.170809.3 97,226 8/9/2017
0.9.170626.1 9,953 6/26/2017
0.8.31-beta 324,198 10/15/2015
0.8.30-beta 4,357 9/16/2015
0.8.27-beta 24,464 9/30/2014
0.8.26-beta 985 8/14/2014
0.8.25-beta 2,300 3/12/2014
0.8.24-aamain00309 395 12/2/2014
0.7.1-beta 2,311 5/3/2013
Show less