Canonical.Madison 1.0.0-preview.1.20260907.3

This is a prerelease version of Canonical.Madison.
dotnet add package Canonical.Madison --version 1.0.0-preview.1.20260907.3
                    
NuGet\Install-Package Canonical.Madison -Version 1.0.0-preview.1.20260907.3
                    
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="Canonical.Madison" Version="1.0.0-preview.1.20260907.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Canonical.Madison" Version="1.0.0-preview.1.20260907.3" />
                    
Directory.Packages.props
<PackageReference Include="Canonical.Madison" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Canonical.Madison --version 1.0.0-preview.1.20260907.3
                    
#r "nuget: Canonical.Madison, 1.0.0-preview.1.20260907.3"
                    
#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.
#:package Canonical.Madison@1.0.0-preview.1.20260907.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Canonical.Madison&version=1.0.0-preview.1.20260907.3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Canonical.Madison&version=1.0.0-preview.1.20260907.3&prerelease
                    
Install as a Cake Tool

Canonical.Madison

NuGet License: GPL-3.0-only

This packages is currently published as a pre-release version and the public API may still change. We provide no official support; issues are addressed on a best-effort basis.

Typed HTTP client for the Madison package version lookup service — the .NET equivalent of rmadison(1). Query the Debian and Ubuntu archives for package versions by suite, architecture and component, using pre-configured endpoints for the Ubuntu and Debian archives, the Debian QA tables, the Debian NEW queue and more.

Installation

dotnet add package Canonical.Madison --prerelease

Usage

using System.Collections.Immutable;
using Canonical.Madison;

using var httpClient = new HttpClient
{
    BaseAddress = WellKnownMadisonEndpoints.Ubuntu,
};
var madison = new MadisonClient(httpClient);

var request = new MadisonRequest(
    PackageNames: ImmutableList.Create("dotnet9"),
    Suites: ImmutableList.Create("noble", "noble-updates"),
    Architectures: ImmutableList.Create("amd64"));

foreach (var entry in await madison.QueryAsync(request))
{
    Console.WriteLine($"{entry.PackageName} {entry.Version} {entry.Series}/{entry.Component}");
    Console.WriteLine($"  architectures: {string.Join(", ", entry.Architectures)}");
}

Results can also be streamed as they are read, which avoids buffering large responses:

await foreach (var entry in madison.QueryAndEnumerateAsync(request, cancellationToken: ct))
{
    Console.WriteLine(entry);
}

The endpoint can be supplied per call instead of via HttpClient.BaseAddress, which makes it easy to compare archives with a single client:

var inUbuntu = await madison.QueryAsync(request, WellKnownMadisonEndpoints.Ubuntu);
var inDebian = await madison.QueryAsync(request, WellKnownMadisonEndpoints.Debian);

Dependency injection

services.AddHttpClient<MadisonClient>(client =>
    client.BaseAddress = WellKnownMadisonEndpoints.Ubuntu);

What's in this package

Type Purpose
MadisonClient Sends queries and parses the response; buffered (QueryAsync) or streaming (QueryAndEnumerateAsync).
MadisonRequest Query parameters: package names, suites, components, architectures, binary type, source/binary expansion and regex matching.
MadisonResponseEntry One parsed result row: package name, version, suite, series, component and architectures. Implements IParsable<T> / ISpanParsable<T>.
WellKnownMadisonEndpoints Pre-configured endpoints.

Well-known endpoints

Ubuntu, Debian, DebianNew, DebianQa, DebianQaNew, DebianQaPorts, DebianQaArchived, DebianQaAll, DebianQaUbuntu, DebianJanitor, UltimateDebianDatabase.

DebianNew and DebianQaNew already pin the queried table/suite in their URI — do not set Suites yourself when using them.

TreatPackagesNamesAsRegex is rejected by most public endpoints (including qa.debian.org) because a broad pattern such as . can easily overload the backing database.

Contributing and support

This library is maintained on a best-effort basis and are not covered by Canonical support agreements. Bug reports and pull requests are welcome via GitHub Issues and pull requests.

License

Copyright 2026 Canonical Ltd.

SPDX-License-Identifier: GPL-3.0-only

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-preview.1.20260907.3 62 9/7/2026
1.0.0-preview.1.20260907.2 57 9/7/2026
1.0.0-preview.1.20260907 66 9/7/2026