FileBasedApp.Toolkit.Dotnet
1.4.0
dotnet add package FileBasedApp.Toolkit.Dotnet --version 1.4.0
NuGet\Install-Package FileBasedApp.Toolkit.Dotnet -Version 1.4.0
<PackageReference Include="FileBasedApp.Toolkit.Dotnet" Version="1.4.0" />
<PackageVersion Include="FileBasedApp.Toolkit.Dotnet" Version="1.4.0" />
<PackageReference Include="FileBasedApp.Toolkit.Dotnet" />
paket add FileBasedApp.Toolkit.Dotnet --version 1.4.0
#r "nuget: FileBasedApp.Toolkit.Dotnet, 1.4.0"
#:package FileBasedApp.Toolkit.Dotnet@1.4.0
#addin nuget:?package=FileBasedApp.Toolkit.Dotnet&version=1.4.0
#tool nuget:?package=FileBasedApp.Toolkit.Dotnet&version=1.4.0
FilebasedApp.Toolkit.Dotnet
Fluent builders and recipes for common dotnet CLI commands.
Features
DotnetBaseRunner<TSelf>— abstract base class providing shared--configurationand--verbosityoptionsDotnetPackSimpleRunner— fluent wrapper arounddotnet packwith options for output directory, symbols, versioning, runtime, and moreDotnetNugetPushSimpleRunner— fluent wrapper arounddotnet nuget pushwith options for source, API key, skip-duplicate, timeout, and moreDotnetRecipes— higher-level helpers that compose dotnet CLI commands into common workflowsPackageRequest/SearchResult/Package— records for deserializingdotnet package search --format jsonoutputPackageRequestExtension— 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
| 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. net11.0 is compatible. |
-
net10.0
- FileBasedApp.Toolkit.SimpleExec (>= 1.4.0)
- NuGet.Versioning (>= 7.9.0)
-
net11.0
- FileBasedApp.Toolkit.SimpleExec (>= 1.4.0)
- NuGet.Versioning (>= 7.9.0)
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.4.0 | 69 | 11/13/2026 |
| 1.3.0 | 119 | 11/8/2026 |
| 1.2.0 | 144 | 10/12/2026 |
| 1.1.2 | 151 | 9/15/2026 |
| 1.1.1 | 177 | 8/29/2026 |
| 1.1.0 | 135 | 8/29/2026 |
| 1.0.1 | 144 | 8/25/2026 |
| 1.0.0 | 146 | 8/23/2026 |
| 0.21.0 | 161 | 7/12/2026 |
| 0.20.0 | 223 | 4/17/2026 |
| 0.20.0-rc-01 | 133 | 4/16/2026 |
| 0.19.0 | 164 | 4/8/2026 |
| 0.19.0-rc-01 | 138 | 4/8/2026 |
| 0.18.1 | 149 | 4/5/2026 |
| 0.18.0 | 147 | 4/5/2026 |
| 0.18.0-rc-01 | 132 | 4/5/2026 |
- Update with support for .net sdk 11
- Spectre integration: add ExtendedCommandSettings.TryGetFiles and TryGetDirectories batch validation for .NET 10 and .NET 11, returning absolute path arrays and aggregating validation errors for multiple candidates.
- Add predefined-root and single-absolute-root forwarding overloads for batch path validation, with XML documentation.
- Expose TryGetFile, TryGetFiles, TryGetDirectory, and TryGetDirectories as public static PathUtil helpers in the core package without Spectre dependencies.
- Retain the protected ExtendedCommandSettings TryGet overloads as backward-compatible wrappers over PathUtil, preserving signatures and caller-argument expressions.
- Update the file-based app template to call PathUtil directly; add core path-helper and compatibility regression coverage.