Microsoft.Diagnostics.Runtime 2.2.332302

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Microsoft.Diagnostics.Runtime --version 2.2.332302                
NuGet\Install-Package Microsoft.Diagnostics.Runtime -Version 2.2.332302                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.Diagnostics.Runtime" Version="2.2.332302" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Microsoft.Diagnostics.Runtime --version 2.2.332302                
#r "nuget: Microsoft.Diagnostics.Runtime, 2.2.332302"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Microsoft.Diagnostics.Runtime as a Cake Addin
#addin nuget:?package=Microsoft.Diagnostics.Runtime&version=2.2.332302

// Install Microsoft.Diagnostics.Runtime as a Cake Tool
#tool nuget:?package=Microsoft.Diagnostics.Runtime&version=2.2.332302                

Migrating to 2.1

Here is a summary of breaking changes in ClrMD 2.1:

Microsoft.Diagnostics.Runtime.Architecture → System.Runtime.InteropServices.Architecture

Use System.Runtime.InteropServices.Architecture instead. Note that the values have shifted, since ClrMD defined an "Unknown" enum member as 0, which is not in the new architecture list.

IBinaryLocator → IFileLocator

We have removed IBinaryLocator and replaced it with IFileLocator. Similarly the properties on DataTarget and CustomDataTarget have changed accordingly.

If you originally implemented the IBinaryLocator interface, you will now need to implement IFileLocator instead. This interface is meant to fully capture the SSQP conventions for making symbol server requests. The specs for which can be found at SSQP Key Conventions and SSQP CLR Private Key conventions.

Most folks don't need to implement these interface specifically, and ClrMD provides a reasonable default implementation. Unfortunately, the best way to see how these are implemented is to look at ClrMD's implementation if you need to change behavior.

Why did we make this change?

IBinaryLocator did not provide the proper interface surface to fully capture Elf and Mach-O symbol server requests and the underlying interface could not be made to work without resorting to some really bad hacks.

It was a lot cleaner to replace IBinaryLocator than to try to hack around the original implementation.

TODO: Provide stream so this can be passed to other libraries.

Why did we make this change?

ClrMD was designed 10 years ago as a monolithic API that does everything for the user, such as parsing files that are unrelated to .Net diagnostics. It was originally designed this way because there wasn't a healthy NuGet ecosystem at the time where these kinds of APIs existed.

We've found some very tough to solve problems in the internals of PEImage where what ClrMD needs is a PE image reader which understands that data could be missing from a dump file, that we may need to go request the file from a symbol server mid-operation, and that requesting from a symbol server should only be done on demand and not eagerly.

We cannot reasonably make those fixes changes without another breaking change to PEImage. At this point it makes sense to have folks use a REAL PE image (and elf image) reader instead of ClrMD's half-baked one.

Some alternatives:

  1. https://www.nuget.org/packages/Marklio.Metadata/
  2. System.Reflection.Metadata
  3. https://github.com/dotnet/symstore/tree/main/src/Microsoft.FileFormats

ModuleInfo has changed slightly

If you implement your own IDataTarget and need to produce ModuleInfo you will need to define an implementation here. I will likely mark my implementations of ModuleInfo for pefiles, elf files, and mach-o files as public at some point, but I wanted to make sure they are actually ready (design-wise) to be marked public first.

VersionInfo is removed

Use System.Version instead.

ClrInfo.DacInfo → ClrInfo.DebugLibraryInfo

Additionally we added ClrInfo.IsSingleFile.

ClrInfo.DacLibraryClrInfo.DebuggingLibraries

Instead of providing a single "DacLibrary", we now enumerate all debugging libraries we know to exist for this CLR runtime. The resulting list is stored in DebuggingLibraries instead. Most folks didn't use DacLibrary directly, but if you did then you will need to enumerate DebuggingLibraries and find all libraries which match your current platform and architecture. Additionally, we also enumerate DBI libraries even though ClrMD does not use them (this is DebugLibraryInfo.Kind).

You will still find the original file DacLibrary pointed to in this list of dacs.

ClrRuntimeInfo has is no longer marked public

This is an odd struct that probably will change over the lifetime of .Net Core. It should not have been exposed as public to begin with. Instead all of this information is provided by ClrInfo.DebuggingLibraries.

ClrInfoProvider was removed

This functionality has been wrapped into ClrInfo, and probably shouldn't have been marked public to begin with.

Why did we make this change?

Creating ClrInfo was a strange, multi class process and involved a lot of moving pieces spread over the codebase. We now consolidated all of the relevant code into ClrInfo.cs. We've also pulled together all of the various ways of finding the DAC and DBI libraries all in one place and provided a way for the user to locate all of the various binaries.

This also lets ClrMD enumerate through all possible matching DAC libraries and query the symbol server for all of them. This is especially helpful in case one of the dacs happens to be missing from the symbol server (which should be rare but isn't unheard of).

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (37)

Showing the top 5 NuGet packages that depend on Microsoft.Diagnostics.Runtime:

Package Downloads
BenchmarkDotNet

Powerful .NET library for benchmarking

ppy.osu.Framework

A 2D application/game framework written with rhythm games in mind.

Backtrace

Backtrace's integration with C# applications allows customers to capture and report handled and unhandled C# exceptions to their Backtrace instance, instantly offering the ability to prioritize and debug software errors.

Phoesion.Glow.SDK.Firefly.SrvHost.DotNet.Dependencies

Phoesion Glow SDK Firefly SrvHost Runner (DotNet) Dependencies

DynaMD

Helper objects to browse complex structures returned by ClrMD

GitHub repositories (39)

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

Repository Stars
dnSpy/dnSpy
.NET debugger and assembly editor
winsw/winsw
A wrapper executable that can run any executable as a Windows service, in a permissive license.
dotnet/BenchmarkDotNet
Powerful .NET library for benchmarking
xoofx/markdig
A fast, powerful, CommonMark compliant, extensible Markdown processor for .NET
microsoft/perfview
PerfView is a CPU and memory performance-analysis tool
Version Downloads Last updated
4.0.0-beta.24360.3 1,789 7/11/2024
4.0.0-beta.24360.2 95 7/10/2024
4.0.0-beta.24320.3 315 6/20/2024
4.0.0-beta.24314.3 907 6/14/2024
3.1.512801 188,479 2/29/2024
3.1.506101 40,567 2/1/2024
3.1.456101 84,878 11/13/2023
3.1.456003 23,486 11/11/2023
3.1.455904 6,925 11/10/2023
3.0.442202 75,640 8/22/2023
3.0.0-beta.23214.4 1,383 4/17/2023
3.0.0-beta.23177.1 280 3/28/2023
3.0.0-beta.23165.1 267 3/16/2023
3.0.0-beta.23159.4 209 3/9/2023
3.0.0-beta.23158.2 207 3/9/2023
3.0.0-beta.23156.1 190 3/6/2023
2.4.416101 1,346,196 3/12/2023
2.3.405304 113,973 1/5/2023
2.2.343001 96,914 10/31/2022
2.2.332302 13,522,076 6/23/2022
2.2.332001 4,330 6/20/2022
2.1.327703 14,534 5/27/2022
2.0.226801 3,078,843 5/19/2021
2.0.226401 1,066 5/14/2021
2.0.222201 58,239 4/22/2021
2.0.221201 11,076 4/14/2021
2.0.217201 53,847 3/22/2021
2.0.161401 1,090,337 12/14/2020
2.0.156101 34,732 11/18/2020
2.0.151903 28,479 10/19/2020
2.0.145301 97,644 9/4/2020
2.0.142701 6,444 8/28/2020
2.0.142501 1,676 8/25/2020
2.0.142103 1,727 8/21/2020
2.0.141902 5,780 8/19/2020
2.0.137201 25,908 7/22/2020
2.0.130507 59,001 6/6/2020
2.0.0-rc.20303.6 467 6/4/2020
2.0.0-rc.20278.6 550 5/28/2020
2.0.0-beta.20276.4 390 5/27/2020
2.0.0-beta.20273.1 456 5/23/2020
2.0.0-beta.20272.2 465 5/22/2020
2.0.0-beta.20272.1 391 5/22/2020
2.0.0-beta.20268.2 470 5/18/2020
2.0.0-beta.20230.2 531 4/30/2020
2.0.0-beta.20230.1 390 4/30/2020
2.0.0-beta.20229.3 389 4/30/2020
2.0.0-beta.20223.2 396 4/23/2020
2.0.0-beta.20222.8 357 4/23/2020
2.0.0-beta.20222.7 350 4/23/2020
2.0.0-beta.20222.5 360 4/22/2020
2.0.0-beta.20220.3 364 4/20/2020
2.0.0-beta.20213.1 498 4/13/2020
2.0.0-beta.20174.2 492 3/24/2020
2.0.0-beta.20072.5 769 1/23/2020
2.0.0-beta.19618.7 530 12/19/2019
2.0.0-beta.19612.8 435 12/12/2019
1.1.142101 259,704 8/21/2020
1.1.132302 13,214 6/23/2020
1.1.127808 93,664 5/29/2020
1.1.126102 8,002,411 5/17/2020
1.1.122004 57,714 4/20/2020
1.1.116301 47,308 3/13/2020
1.1.61812 87,789 12/19/2019
1.1.57604 4,924,841 11/26/2019
1.1.57004 5,492 11/20/2019
1.1.46104 121,035 9/11/2019
1.1.37504 91,945 7/25/2019
1.1.35902 8,007 7/9/2019
1.1.35504 1,949 7/5/2019
1.0.5 1,961,693 3/19/2019
1.0.3 221,938 2/13/2019
1.0.2 24,776 12/17/2018
1.0.0 16,178 11/22/2018
0.9.180305.1 269,401 3/6/2018
0.9.170809.3 235,521 8/9/2017
0.9.170626.1 22,691 6/26/2017
0.8.31-beta 722,557 10/15/2015
0.8.30-beta 6,598 9/16/2015
0.8.27-beta 40,926 9/30/2014
0.8.26-beta 1,969 8/14/2014
0.8.25-beta 3,404 3/12/2014
0.8.24-aamain00309 1,458 12/2/2014
0.7.1-beta 3,540 5/3/2013

See https://github.com/Microsoft/clrmd/releases for the latest release notes