Microsoft.Diagnostics.Runtime 2.0.130507

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. 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.0.130507
NuGet\Install-Package Microsoft.Diagnostics.Runtime -Version 2.0.130507
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.0.130507" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Microsoft.Diagnostics.Runtime --version 2.0.130507
#r "nuget: Microsoft.Diagnostics.Runtime, 2.0.130507"
#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.0.130507

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

ClrMD 2.0 Beta Release Notes

Over the last few weeks we have been rewriting a lot of the internal core of ClrMD to fix a lot of issues that have been problematic in the library. ClrMD 2.0 is faster, allows you to control how much memory the library uses, and is thread safe (with exceptions), but it has a lot of breaking changes which will require you to update existing code to use it.

Quick Notes

We plan to continue fixing bugs in ClrMD 1.1 for the forseeable future, so you are not forced to upgrade if you do not want to. I do plan to only add new features to ClrMD 2.0, but the community is welcome to submit Pull Requests to backport or add features to ClrMD 1.1.

Please note that the API surface area of ClrMD 2.0 is not finalized and there may be breaking changes between now and when the library is out of beta. I expect to release the non-beta version around March/April 2020.

Changes from ClrMD 1.1

Added features:

  1. Memory Usage/Performance - ClrMD has reduced its overall memory usage and improved performance.
  2. Cache Control - You can now control what ClrMD caches to via DataTarget.CacheOptions. Note that disabling caches does greatly slow the library down but it also drastically reduces memory usage. You can also call ClrRuntime.FlushCachedData at any time to empty ClrMD's caches and reclaim memory.
  3. Thread Safety - If ClrRuntime.IsThreadSafe returns true then you are allowed to call all functions from multiple threads. Please note that you likely will not see much performance improvements by running algorithms in parallel. The CLR debugging layer, mscordaccore.dll, takes a giant lock around most operations which means we do not get easy performance gains. This should make your code much easier to write if you need to do work on another thread.
  4. Nullable Reference Types - ClrMD fully implements nullable reference types so you will know exactly what you need to null check from the library.
  5. Architectural Overhaul - ClrMD is now much less internally coupled. Most implementation types are now public, allowing you to use those types directly or to use the I*Builder interfaces to "mock" objects more easily. While the changes aren't perfect for mocking the library, it's definitely better than were we were before.
  6. Clean up Exceptions Thrown by ClrMD - This is planned but not yet completed.
  7. Provide a set of Benchmarks - ClrMD will provide a reasonable set of benchmarks so you know how much an operation should cost. This is planned but not yet completed.

Removed:

  1. Removed Blocking Objects - This was buggy in its initial implementation and never worked right. We do not intend to support this or rebuild it in 2.0.
  2. SymbolLocator partially removed - ClrMD still supports communicating with a symbol server to locate binaries but it's no longer intended to be a general purpose symbol server client.
  3. CLR v2 and v4 (prior to 4.5) support removed - ClrMD supports all .Net Core versions and Desktop .Net 4.5 and beyond. If you need to debug earlier versions of CLR, please use ClrMD 1.1.
  4. PDB Reading Removed - The implementation I was carrying in ClrMD was buggy and did not support PortablePDBs. I do not intend to keep this functionality in ClrMD 2.0. It's just too difficult to keep working and it's not needed or used by the rest of the library.

Why did we make these changes?

The first version of ClrMD is nearly 10 years old now, and it's starting to show its age. Over the years I've made some bad design decisions and added some questionable features that I wish I could fix or move to another (supported) library, but I've tried to maintain compatibility for folks who already built tools on top of ClrMD and that's hamstrung development in a lot of areas.

Please feel free to file issues against this beta version of ClrMD if you have questions, a feature request, or a bug to report.

Better performance, less memory.

We use Span<T> in place of most byte[] data reading operations, and use ArrayPool instead of doing our own allocating. We have eliminated a ton of needless garbage generated at runtime.

Better architecture

The old ClrMD implementation had a deep, confusing, and poorly thought out internal class heirarchy. This mostly grew organically from years of development and not be cleaned up due to compatibility concerns. The entire library has been refactored from the ground up to fix this. We've also removed Lazy<T> usage throughout a lot of the codebase because it made debugging problems with ClrMD difficult to do. We still evaluate most properties lazily, just without the use of that class.

Thanks

Thank you to everyone who contributed feedback, issues, and code for ClrMD 2.0. Especially NextTurn, who submitted countless changes and pull requests to make this possible.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 is compatible. 
.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 is compatible.  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 (36)

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

Package Downloads
BenchmarkDotNet The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

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 The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Phoesion Glow SDK Firefly SrvHost Runner (DotNet) Dependencies

DynaMD

Helper objects to browse complex structures returned by ClrMD

GitHub repositories (36)

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
3.1.512801 7,923 2/29/2024
3.1.506101 14,881 2/1/2024
3.1.456101 37,545 11/13/2023
3.1.456003 10,305 11/11/2023
3.1.455904 1,367 11/10/2023
3.0.442202 38,665 8/22/2023
3.0.0-beta.23214.4 1,199 4/17/2023
3.0.0-beta.23177.1 232 3/28/2023
3.0.0-beta.23165.1 215 3/16/2023
3.0.0-beta.23159.4 161 3/9/2023
3.0.0-beta.23158.2 156 3/9/2023
3.0.0-beta.23156.1 140 3/6/2023
2.4.416101 719,897 3/12/2023
2.3.405304 87,394 1/5/2023
2.2.343001 72,846 10/31/2022
2.2.332302 8,297,797 6/23/2022
2.2.332001 4,022 6/20/2022
2.1.327703 13,892 5/27/2022
2.0.226801 2,672,037 5/19/2021
2.0.226401 981 5/14/2021
2.0.222201 53,652 4/22/2021
2.0.221201 7,061 4/14/2021
2.0.217201 50,821 3/22/2021
2.0.161401 975,796 12/14/2020
2.0.156101 33,657 11/18/2020
2.0.151903 24,583 10/19/2020
2.0.145301 85,175 9/4/2020
2.0.142701 6,194 8/28/2020
2.0.142501 1,575 8/25/2020
2.0.142103 1,636 8/21/2020
2.0.141902 5,692 8/19/2020
2.0.137201 25,116 7/22/2020
2.0.130507 42,953 6/6/2020
2.0.0-rc.20303.6 420 6/4/2020
2.0.0-rc.20278.6 501 5/28/2020
2.0.0-beta.20276.4 343 5/27/2020
2.0.0-beta.20273.1 405 5/23/2020
2.0.0-beta.20272.2 423 5/22/2020
2.0.0-beta.20272.1 342 5/22/2020
2.0.0-beta.20268.2 423 5/18/2020
2.0.0-beta.20230.2 487 4/30/2020
2.0.0-beta.20230.1 350 4/30/2020
2.0.0-beta.20229.3 350 4/30/2020
2.0.0-beta.20223.2 345 4/23/2020
2.0.0-beta.20222.8 317 4/23/2020
2.0.0-beta.20222.7 310 4/23/2020
2.0.0-beta.20222.5 319 4/22/2020
2.0.0-beta.20220.3 329 4/20/2020
2.0.0-beta.20213.1 460 4/13/2020
2.0.0-beta.20174.2 448 3/24/2020
2.0.0-beta.20072.5 727 1/23/2020
2.0.0-beta.19618.7 490 12/19/2019
2.0.0-beta.19612.8 382 12/12/2019
1.1.142101 238,620 8/21/2020
1.1.132302 12,868 6/23/2020
1.1.127808 85,965 5/29/2020
1.1.126102 7,247,338 5/17/2020
1.1.122004 53,599 4/20/2020
1.1.116301 46,349 3/13/2020
1.1.61812 85,870 12/19/2019
1.1.57604 4,719,896 11/26/2019
1.1.57004 5,337 11/20/2019
1.1.46104 117,565 9/11/2019
1.1.37504 72,840 7/25/2019
1.1.35902 7,567 7/9/2019
1.1.35504 1,808 7/5/2019
1.0.5 1,468,024 3/19/2019
1.0.3 180,561 2/13/2019
1.0.2 23,903 12/17/2018
1.0.0 15,099 11/22/2018
0.9.180305.1 266,962 3/6/2018
0.9.170809.3 175,281 8/9/2017
0.9.170626.1 22,505 6/26/2017
0.8.31-beta 694,941 10/15/2015
0.8.30-beta 6,510 9/16/2015
0.8.27-beta 40,663 9/30/2014
0.8.26-beta 1,900 8/14/2014
0.8.25-beta 3,315 3/12/2014
0.8.24-aamain00309 1,375 12/2/2014
0.7.1-beta 3,452 5/3/2013

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