Canonical.DistroInfo.Static
1.0.0-preview.1.20260907.3
dotnet add package Canonical.DistroInfo.Static --version 1.0.0-preview.1.20260907.3
NuGet\Install-Package Canonical.DistroInfo.Static -Version 1.0.0-preview.1.20260907.3
<PackageReference Include="Canonical.DistroInfo.Static" Version="1.0.0-preview.1.20260907.3" />
<PackageVersion Include="Canonical.DistroInfo.Static" Version="1.0.0-preview.1.20260907.3" />
<PackageReference Include="Canonical.DistroInfo.Static" />
paket add Canonical.DistroInfo.Static --version 1.0.0-preview.1.20260907.3
#r "nuget: Canonical.DistroInfo.Static, 1.0.0-preview.1.20260907.3"
#:package Canonical.DistroInfo.Static@1.0.0-preview.1.20260907.3
#addin nuget:?package=Canonical.DistroInfo.Static&version=1.0.0-preview.1.20260907.3&prerelease
#tool nuget:?package=Canonical.DistroInfo.Static&version=1.0.0-preview.1.20260907.3&prerelease
Canonical.DistroInfo.Static
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.
Compile-time complement to
Canonical.DistroInfo. Provides static
instances of the release data from the distro-info CSV files, eliminating the runtime file
dependency — useful in minimal containers, on non-Debian hosts, and in unit tests that need
deterministic data.
Installation
dotnet add package Canonical.DistroInfo.Static --prerelease
Usage
using Canonical.DistroInfo.Ubuntu;
// No file access and no async: the data is baked into the assembly.
var noble = UbuntuReleases.NobleNumbat;
Console.WriteLine(noble.Version); // 24.04 LTS
Console.WriteLine(noble.ShortVersion); // 24.04
Console.WriteLine(noble.IsLts); // True
// The full collection exposes the same query API as Canonical.DistroInfo.
var lts = UbuntuReleases.Collection.GetLatestReleasedLts();
if (UbuntuReleases.Collection.TryGetBySeries("noble", out var release))
Console.WriteLine(release == noble); // True
UbuntuReleases.Collection is an UbuntuReleaseInfoCollection, so every lifecycle query from
Canonical.DistroInfo (GetDevel, GetAllStandardSupported, GetAllEsmSupported, …) behaves
identically — only the data source differs.
Choosing between the two packages
Canonical.DistroInfo |
Canonical.DistroInfo.Static |
|
|---|---|---|
| Data source | distro-info-data CSV files, read at runtime | snapshot embedded at build time |
Requires distro-info-data |
yes | no |
| Picks up new releases | automatically, when the system data is updated | only by upgrading this package |
| API shape | async loading |
direct static access |
Both can be combined: read from disk when the data is available and fall back to the embedded snapshot otherwise.
What's in this package
UbuntuReleases— named release constants (e.g.NobleNumbat) plusCollection.
Static Debian data (DebianReleases) is not populated yet.
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 | Versions 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. |
-
net10.0
- Canonical.DistroInfo (>= 1.0.0-preview.1.20260907.3)
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 | 66 | 9/7/2026 |
| 1.0.0-preview.1.20260907.2 | 64 | 9/7/2026 |
| 1.0.0-preview.1.20260907 | 58 | 9/7/2026 |