Soenneker.Managers.NuGetPackage 11.0.1399

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

Soenneker.Managers.NuGetPackage

Stages a file or directory into a library's Resources folder, builds and packs the project, then pushes the resulting package to NuGet.

Install

dotnet add package Soenneker.Managers.NuGetPackage

Usage

using Microsoft.Extensions.DependencyInjection;
using Soenneker.Managers.NuGetPackage.Abstract;
using Soenneker.Managers.NuGetPackage.Registrars;

services.AddNuGetPackageManagerAsSingleton();

INuGetPackageManager packages =
    serviceProvider.GetRequiredService<INuGetPackageManager>();

await packages.BuildPackAndPushFile(
    gitDirectory: repositoryPath,
    libraryName: "Soenneker.Libraries.Tool.Windows",
    targetFilePath: Path.Combine(repositoryPath, "src", "Soenneker.Libraries.Tool.Windows", "Resources", "tool.exe"),
    sourceFilePath: downloadedToolPath,
    version: buildVersion,
    nuGetToken: nugetToken,
    cancellationToken);

This is a publishing operation, not a package-building preview: a successful call pushes to the configured NuGet source.

What you get

  • INuGetPackageManager — Handles building, packaging, and publishing .NET projects to NuGet.
  • NuGetPackageManagerRegistrar — Handles building, packaging, and publishing .NET projects to NuGet.

API at a glance

API What it does Result / important behavior
NuGetPackageManagerRegistrar.AddNuGetPackageManagerAsSingleton(services) Adds INuGetPackageManager as a singleton service. The same service collection, so additional registrations can be chained.
NuGetPackageManagerRegistrar.AddNuGetPackageManagerAsScoped(services) Adds INuGetPackageManager as a scoped service. The same service collection, so additional registrations can be chained.

Important behavior

  • The target file or directory is deleted and replaced before restore/build/pack begins.
  • Targets, the project file, and the expected .nupkg must resolve inside gitDirectory; resource targets must remain beneath the selected library's Resources folder.
  • The source file or directory may be outside the checkout and is never deleted by this manager.
  • Packages are built in Release configuration and written to the checkout root as <libraryName>.<version>.nupkg.
  • Keep the NuGet token in a secret provider. The token is passed only to the push operation.
  • Cancellation or a failed build can leave the dedicated checkout modified. Use a disposable checkout and clean it up at the workflow boundary.
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 (1)

Showing the top 1 NuGet packages that depend on Soenneker.Managers.NuGetPackage:

Package Downloads
Soenneker.Managers.Runners

Handles Runner operations and coordination

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.1399 0 11/19/2026
11.0.1398 0 11/19/2026
11.0.1397 0 11/19/2026
11.0.1395 11 11/18/2026
11.0.1393 151 11/18/2026
11.0.1392 3,129 11/16/2026
11.0.1391 295 11/15/2026
11.0.1390 4,156 11/12/2026
11.0.1389 334 11/11/2026
11.0.1388 832 11/11/2026
11.0.1387 322 11/11/2026
11.0.1386 202 11/11/2026
11.0.1385 594 11/11/2026
11.0.1384 584 11/11/2026
11.0.1383 615 11/11/2026
11.0.1382 102 11/11/2026
11.0.1381 8,367 11/3/2026
11.0.1380 541 11/3/2026
11.0.1379 263 11/3/2026
11.0.1378 584 11/3/2026
Loading failed

Updated Soenneker.Utils.Dotnet.NuGet to 11.0.2188