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
                    
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="Soenneker.Utils.NuGet" Version="11.0.3006" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Utils.NuGet" Version="11.0.3006" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Utils.NuGet" />
                    
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 Soenneker.Utils.NuGet --version 11.0.3006
                    
#r "nuget: Soenneker.Utils.NuGet, 11.0.3006"
                    
#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 Soenneker.Utils.NuGet@11.0.3006
                    
#: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=Soenneker.Utils.NuGet&version=11.0.3006
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.NuGet&version=11.0.3006
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image 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 Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed

Update dependency Soenneker.Extensions.HttpClient to 11.0.4199 (#3777)