.NET tool
This section contains the following:
Prerequisites
You must have the .NET 6 SDK installed on your computer. To verify your installation, run the following command:
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:
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:
OS | Path |
---|---|
Windows | %USERPROFILE%\.dotnet\tools |
Linux/macOS | $HOME/.dotnet/tools |
To verify the global installation, execute the following command:
ch-cli
Local
If you have not created a tool manifest yet, navigate to the desired folder on the command line and execute:
dotnet new tool-manifest
Once you created the manifest, install the CLI using the following command:
dotnet tool install --add-source https://nuget.sitecore.com/resources/v3/index.json ch-cli
To verify the local installation, execute the following command:
dotnet ch-cli
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
dotnet tool update --global --add-source https://nuget.sitecore.com/resources/v3/index.json ch-cli
Local
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
dotnet tool uninstall --global ch-cli
Local
dotnet tool uninstall ch-cli