HelpLine.HelpBuilder 0.1.0-preview.28

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

HelpLine.HelpBuilder

Source-compatible adapter for the System.CommandLine HelpBuilder API.

Background

The HelpBuilder and associated types were made internal in System.CommandLine 2.0.0, but during the long beta4 period these types had been public and are wiely used. This library re-publishes them in the System.CommandLine.Help namespace so that you can migrate from beta4 to 2.0.0+ with almost no code changes to your help customization.

Over time, this library will be updated to incorporate bug fixes from the internal System.CommandLine HelpBuilder. Additional functionality and improvements will be introduced that do not break source code compatibility.

Usage

using System.CommandLine;
using System.CommandLine.Help;

var rootCommand = new RootCommand("sample");

var helpBuilder = new HelpBuilder(120);
helpBuilder.CustomizeLayout(_ =>
[
    HelpBuilder.Default.SynopsisSection(),
    HelpBuilder.Default.CommandUsageSection(),
    HelpBuilder.Default.OptionsSection(),
    HelpBuilder.Default.SubcommandsSection(),
]);

rootCommand.UseHelpBuilder(helpBuilder);

UseHelpBuilder applies the builder by replacing the HelpOption.Action on all instances of HelpOption found in the target command or its descendants.

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.1.0-preview.28 45 5/8/2026
0.1.0-preview.26 42 5/6/2026
0.1.0-preview.20 40 5/5/2026