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 updating existing .docsproj files to use the latest DotNetDocs.Sdk version from NuGet.

Remarks

This command searches for all .docsproj files in the current directory (and optionally subdirectories), queries NuGet.org for the latest SDK version, and updates the SDK reference in each file.

Constructors

.ctor

Syntax

.ctor Inherited

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

Syntax

.ctor Inherited

Inherited from object

Syntax

Properties

ProjectPath

Gets or sets the project name or path to a specific .docsproj file to update.

Syntax

Property Value

Type: string?

Recursive

Gets or sets whether to search recursively in subdirectories.

Syntax

Property Value

Type: bool

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 update .docsproj SDK references to the latest version from NuGet.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<int> A task that represents the asynchronous operation. The task result is 0 if the update is successful; otherwise, 1.

Remarks

If a specific project is not specified, the method searches for all .docsproj files in the current directory (and subdirectories if —recursive is specified). The —project option accepts either a project name (e.g., “MyProject.Docs”) or a file path (e.g., “MyProject.Docs.docsproj” or “path/to/MyProject.Docs.docsproj”). 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.