Skip to main content

Definition

Assembly: CloudNimble.DotNetDocs.Tools.dll Namespace: CloudNimble.DotNetDocs.Tools.Commands Inheritance: CloudNimble.DotNetDocs.Tools.Commands.Base.DocsCommandBase

Syntax

Summary

Command-line tool for creating and adding a documentation project to a solution file.

Remarks

This command creates a .docsproj file configured for the specified documentation type (defaults to Mintlify) and adds it to the specified solution file (.sln or .slnx). The project is automatically added to a “Docs” solution folder. For .slnx files, the command post-processes the XML to add Type=“C#” attributes to .docsproj nodes.

Constructors

.ctor

Syntax

.ctor Inherited

Inherited from CloudNimble.DotNetDocs.Tools.Commands.Base.DocsCommandBase

Syntax

.ctor Inherited

Inherited from object

Syntax

Properties

DocumentationType

Gets or sets the documentation type for the project.

Syntax

Property Value

Type: string?

OutputDirectory

Gets or sets the output directory for the generated documentation project.

Syntax

Property Value

Type: string?

ProjectName

Gets or sets the name of the documentation project.

Syntax

Property Value

Type: string?

Remarks

If not specified, the project name defaults to the solution name.

SkipSolution

Gets or sets whether to skip adding the project to the solution file.

Syntax

Property Value

Type: bool

SolutionPath

Gets or sets the path to the solution file (.sln or .slnx) to use.

Syntax

Property Value

Type: string?

UsePrerelease

Gets or sets whether to use the latest prerelease version of the DotNetDocs.Sdk.

Syntax

Property Value

Type: bool

Methods

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetLatestSdkVersionAsync Inherited

Inherited from CloudNimble.DotNetDocs.Tools.Commands.Base.DocsCommandBase
Queries NuGet.org for the latest version of the DotNetDocs.Sdk package.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<string?> The latest version string, or null if the query fails.

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

GetVersion Inherited

Inherited from CloudNimble.DotNetDocs.Tools.Commands.Base.DocsCommandBase
Gets the version string for the tool.

Syntax

Returns

Type: string The version string.

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

OnExecute

Executes the command to create and add a documentation project to the specified solution.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<int> A task that represents the asynchronous operation. The task result is 0 if the documentation project is created and added successfully; otherwise, 1.

Remarks

If the solution file is not specified, the method attempts to locate one in the current directory. The documentation project is created in the specified output directory or, if not provided, in a default location based on the solution file. Any errors encountered during execution are reported to the console, and a nonzero exit code is returned.

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?

WriteHeader Inherited

Inherited from CloudNimble.DotNetDocs.Tools.Commands.Base.DocsCommandBase
Writes the DotNetDocs CLI header to the console with colorful ASCII art and version information.

Syntax

Remarks

This method displays a multi-line ASCII art logo combining the DotNetDocs branding with version and attribution information. The output uses console colors to create an eye-catching header for CLI operations.