AvaDiagnostics12 12.1.1
dotnet add package AvaDiagnostics12 --version 12.1.1
NuGet\Install-Package AvaDiagnostics12 -Version 12.1.1
<PackageReference Include="AvaDiagnostics12" Version="12.1.1" />
<PackageVersion Include="AvaDiagnostics12" Version="12.1.1" />
<PackageReference Include="AvaDiagnostics12" />
paket add AvaDiagnostics12 --version 12.1.1
#r "nuget: AvaDiagnostics12, 12.1.1"
#:package AvaDiagnostics12@12.1.1
#addin nuget:?package=AvaDiagnostics12&version=12.1.1
#tool nuget:?package=AvaDiagnostics12&version=12.1.1
AvaDiagnostics12
An unofficial community fork of the legacy Avalonia.Diagnostics in-process DevTools, updated to build
and run against Avalonia 12.
Not affiliated with or endorsed by the AvaloniaUI project. The upstream package was archived and deprecated in favour of the standalone AvaloniaUI Developer Tools — see Upstream alternative below.
Install
dotnet add package AvaDiagnostics12
Usage
The public API is unchanged from the original package — the namespaces are still Avalonia.Diagnostics.*,
so existing code needs no edits:
public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
desktop.MainWindow = new MainWindow();
#if DEBUG
desktop.MainWindow.AttachDevTools();
#endif
}
base.OnFrameworkInitializationCompleted();
}
Press F12 to open the DevTools window.
What changed from upstream
- Ported to the Avalonia 12 input APIs (
RawInputEventArgs.RootandPointerOverRootare nowIInputRootrather thanVisual), including hotkey and pointer-position handling over popup roots. - The NuGet package id is
AvaDiagnostics12, so this fork is never confused with the officialAvalonia.Diagnosticspackage at install time.
Tests
dotnet test Avalonia.Diagnostics.slnx
tests/Avalonia.Diagnostics.UnitTests covers the view models, the filter and conversion helpers, and
the Avalonia 11 → 12 port fixes that compile cleanly but break at runtime. UI-thread tests use
Avalonia.Headless via [AvaloniaFact]/[AvaloniaTheory] (xunit v3); the rest are plain [Fact]s.
Nearly everything in this library is internal, so the test project is granted access through
src/Avalonia.Diagnostics/Properties/InternalsVisibleTo.cs and is signed with the same
build/avalonia.snk. That grant does not extend to Avalonia's own internals — tests cannot name
types such as InputManager, TopLevel.InputRoot or LayoutManager, and RawKeyEventArgs has no
publicly reachable constructor. Where that got in the way, the logic under test was split into a
helper taking only public types rather than reached by reflection, so a rename still breaks the test.
Not covered: VisualExtensions.RenderTo (needs real Skia rendering, not the default headless
platform) and the popup-freeze / hotkey input plumbing in Views/MainWindow (needs synthesized raw
input against live popup roots).
Known limitation: assembly identity
The shipped assembly is still named Avalonia.Diagnostics and is still strong-named with AvaloniaUI's
key. This is not a cosmetic leftover — Avalonia 12 exposes the internals this code needs
(InputManager, IRenderer, IClassesChangedListener) through
[assembly: InternalsVisibleTo("Avalonia.Diagnostics", PublicKey=…)]. Renaming the assembly or signing
with a different key fails the build with CS0122.
Consequence: do not reference AvaDiagnostics12 and the official Avalonia.Diagnostics package in
the same project — both produce an Avalonia.Diagnostics.dll and the build will fail with a file
conflict. Use one or the other.
Upstream alternative
If you don't need the classic in-process window, the maintained replacement is:
dotnet add package AvaloniaUI.DiagnosticsSupport
dotnet tool install --global AvaloniaUI.DeveloperTools
Then call this.AttachDeveloperTools() in Application.Initialize() and press F12. It includes a
free Community edition covering everything the legacy package did. See the
Developer Tools documentation.
License
MIT — see LICENSE. Original code copyright © The AvaloniaUI Project. Everything in this fork is released under the same MIT license; do whatever you like with it.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Avalonia (>= 12.1.0)
- Avalonia.Controls.ColorPicker (>= 12.1.0)
- Avalonia.Controls.DataGrid (>= 12.1.0)
- Avalonia.Themes.Simple (>= 12.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.