FileBasedApp.Toolkit.Dotnet 0.18.1

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

FilebasedApp.Toolkit.Dotnet

Fluent builders and recipes for common dotnet CLI commands.

Features

  • DotnetBaseRunner<TSelf> — abstract base class providing shared --configuration and --verbosity options
  • DotnetPackSimpleRunner — fluent wrapper around dotnet pack with options for output directory, symbols, versioning, runtime, and more
  • DotnetNugetPushSimpleRunner — fluent wrapper around dotnet nuget push with options for source, API key, skip-duplicate, timeout, and more
  • DotnetRecipes — higher-level helpers that compose dotnet CLI commands into common workflows
  • PackageRequest / SearchResult / Package — records for deserializing dotnet package search --format json output
  • PackageRequestExtension — helpers for flattening and querying package search results

Examples

Packing a project

using FilebasedApp.Toolkit.Dotnet;
using TruePath;

var output = AbsolutePath.Create("/artifacts");

await DotnetPackSimpleRunner.Init()
    .WithProject(AbsolutePath.Create("/src/MyProject.csproj"))
    .WithConfiguration("Release")
    .WithOutput(output)
    .WithVersionSuffix("beta-01")
    .RunAsync();

Pushing a NuGet package

using FilebasedApp.Toolkit.Dotnet;
using TruePath;

await DotnetNugetPushSimpleRunner.Init()
    .WithPackage(AbsolutePath.Create("/artifacts/MyPackage.1.0.0.nupkg"))
    .WithSource("https://api.nuget.org/v3/index.json")
    .WithApiKey(apiKey)
    .WithSkipDuplicate()
    .RunAsync();

Searching for a NuGet package

using FilebasedApp.Toolkit.Dotnet;

var result = await DotnetRecipes.GetPackageInformation("Newtonsoft.Json", includePrerelease: false);

// Get the highest version of a specific package
var package = result.GetHighestVersion("Newtonsoft.Json");
Console.WriteLine($"{package.Id} {package.LatestVersion}");

// Flatten all packages across all sources
foreach (var (sourceName, pkg) in result.FlattenedPackages)
{
    Console.WriteLine($"[{sourceName}] {pkg.Id} {pkg.LatestVersion}");
}

Bugs or things missing

Feel free to create an issue or submit a pull request.

Credits

Floppy disc icons created by IYAHICON - Flaticon

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.

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
0.18.1 0 4/5/2026
0.18.0 3 4/5/2026
0.18.0-rc-01 25 4/5/2026

- Initial release
- Added DotnetBaseRunner — abstract base for fluent dotnet CLI runners with --configuration and --verbosity
- Added DotnetPackSimpleRunner — fluent wrapper around dotnet pack
- Added DotnetNugetPushSimpleRunner — fluent wrapper around dotnet nuget push
- Added DotnetRecipes with GetPackageInformation for JSON-based NuGet package search
- Added PackageRequest, SearchResult, and Package records for dotnet package search deserialization
- Added PackageRequestExtension with FlattenedPackages and GetHighestVersion helpers