Soenneker.Utils.NuGet
11.0.3006
Prefix Reserved
dotnet add package Soenneker.Utils.NuGet --version 11.0.3006
NuGet\Install-Package Soenneker.Utils.NuGet -Version 11.0.3006
<PackageReference Include="Soenneker.Utils.NuGet" Version="11.0.3006" />
<PackageVersion Include="Soenneker.Utils.NuGet" Version="11.0.3006" />
<PackageReference Include="Soenneker.Utils.NuGet" />
paket add Soenneker.Utils.NuGet --version 11.0.3006
#r "nuget: Soenneker.Utils.NuGet, 11.0.3006"
#:package Soenneker.Utils.NuGet@11.0.3006
#addin nuget:?package=Soenneker.Utils.NuGet&version=11.0.3006
#tool nuget:?package=Soenneker.Utils.NuGet&version=11.0.3006
Soenneker.Utils.NuGet
Queries NuGet V3 feeds for package metadata and versions, traverses dependency metadata, and submits package unlist requests.
Installation
dotnet add package Soenneker.Utils.NuGet
Quick start
using Soenneker.Utils.NuGet.Registrars;
services.AddNuGetUtilAsSingleton();
Then inject INuGetUtil wherever you need it.
Every source argument expects a NuGet V3 index.json URL, not a package page or flat-container
URL. Omitting it uses nuget.org.
Search and versions
NuGetSearchResponse? search = await nuGetUtil.Search(
"Soenneker.Utils.Json",
cancellationToken: cancellationToken);
List<string> versions = await nuGetUtil.GetAllListedVersions(
"Soenneker.Utils.Json",
sortDescending: true,
cancellationToken: cancellationToken);
string? latestStable = await nuGetUtil.GetLatestListedVersion(
"Soenneker.Utils.Json",
cancellationToken: cancellationToken);
Search is a feed search and can return multiple fuzzy matches. Listed-version methods select the
exact package ID from those results. Descending order follows NuGet semantic-version precedence;
GetLatestListedVersion skips prerelease versions. An empty list or null latest value means no
matching listed version was returned.
GetAllVersions uses the feed's package-base-address resource and includes unlisted versions when
the feed exposes them. GetIndex, GetServiceUri, and GetCatalogUri expose lower-level V3
service discovery. Discovered service URLs are cached for the utility's lifetime.
Unlist a package version
await nuGetUtil.Delete(
packageName: "Contoso.Package",
version: "1.2.3",
apiKey: apiKey,
cancellationToken: cancellationToken);
On nuget.org, the V3 delete endpoint unlists a package version; it does not erase the package.
Other feeds can define different delete behavior. DeleteAllVersions discovers the listed
versions and submits the same operation for each one in rate-limited batches, so verify the source,
package ID, and credentials before calling it. HTTP failures and requested cancellation propagate.
Setting log: false suppresses the per-delete informational and error messages.
Dependency metadata
List<KeyValuePair<string, string>> dependencies =
await nuGetUtil.GetTransitiveDependencies("Contoso.Package", "1.2.3", cancellationToken: cancellationToken);
This is metadata traversal, not NuGet restore resolution. It combines every dependency group, does not choose a target framework, and extracts only the supported lower-bound form from version ranges before following it. Do not use the result as a lock file or as proof of the versions NuGet would install. Results are de-duplicated and cached by source/package/version for the utility's lifetime.
GetAllPackages(owner) pages through search results and retains entries whose owners contain the
requested owner. GetTotalDownloads(owner) sums the returned version counts into an int; feed
support and owner metadata determine how complete those results are.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- NuGet.Versioning (>= 8.0.0)
- Soenneker.Extensions.HttpClient (>= 11.0.4199)
- Soenneker.NuGet.Client (>= 11.0.1824)
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 |
|---|---|---|
| 11.0.3006 | 0 | 11/15/2026 |
| 11.0.3005 | 0 | 11/15/2026 |
| 11.0.3004 | 2,015 | 11/11/2026 |
| 11.0.3003 | 55 | 11/11/2026 |
| 11.0.3002 | 48 | 11/11/2026 |
| 11.0.3001 | 54 | 11/11/2026 |
| 11.0.3000 | 56 | 11/11/2026 |
| 11.0.2998 | 56 | 11/11/2026 |
| 11.0.2997 | 52 | 11/11/2026 |
| 11.0.2996 | 48 | 11/11/2026 |
| 11.0.2995 | 51 | 11/11/2026 |
| 11.0.2994 | 55 | 11/11/2026 |
| 11.0.2993 | 50 | 11/11/2026 |
| 11.0.2992 | 50 | 11/11/2026 |
| 11.0.2991 | 98 | 11/4/2026 |
| 11.0.2990 | 94 | 11/3/2026 |
| 11.0.2989 | 85 | 11/3/2026 |
| 11.0.2988 | 88 | 11/3/2026 |
| 11.0.2987 | 96 | 11/3/2026 |
| 11.0.2986 | 91 | 11/3/2026 |
Update dependency Soenneker.Extensions.HttpClient to 11.0.4199 (#3777)