.NET tool

Version: 3.4

This section contains the following:

  1. Prerequisites
  2. Installation
  3. Update
  4. Uninstall

Prerequisites

You must have the .NET 6 SDK installed on your computer. To verify your installation, run the following command:

RequestResponse
dotnet --list-sdks

If the command fails or no version from the .NET 6 branch appears, go to the .NET website and download and install the most recent SDK release for your operating system.

Installation

You can install .NET tools either system-wide or locally in a specific directory (for example, in a project or customer directory). See the official documentation for more information on the differences.

Global

Execute the following command to install the command-line interface (CLI) as a global tool:

RequestResponse
dotnet tool install --global --add-source https://nuget.sitecore.com/resources/v3/index.json ch-cli

Upon completion, the tool lives in the following location and is available in the path:

OSPath
Windows%USERPROFILE%\.dotnet\tools
Linux/macOS$HOME/.dotnet/tools

To verify the global installation, execute the following command:

RequestResponse
ch-cli

Local

If you have not created a tool manifest yet, navigate to the desired folder on the command line and execute:

RequestResponse
dotnet new tool-manifest

Once you created the manifest, install the CLI using the following command:

RequestResponse
dotnet tool install --add-source https://nuget.sitecore.com/resources/v3/index.json ch-cli

To verify the local installation, execute the following command:

RequestResponse
dotnet ch-cli
Note

If you installed the local tool in a shared repository, other developers can install it by executing the following command:
dotnet tool restore

Update

Once installed, you can update the tool by executing the following command depending on your installation mode:

Global

RequestResponse
dotnet tool update --global --add-source https://nuget.sitecore.com/resources/v3/index.json ch-cli

Local

RequestResponse
dotnet tool update --add-source https://nuget.sitecore.com/resources/v3/index.json ch-cli

Uninstall

To uninstall the tool, you can execute the following command depending on your installation mode:

Global

RequestResponse
dotnet tool uninstall --global ch-cli

Local

RequestResponse
dotnet tool uninstall ch-cli

Do you have some feedback for us?

If you have suggestions for improving this article,