Provided by: dotnet-host_6.0.136-0ubuntu1~22.04.1_amd64 

dotnet new –install option
This article applies to: ✔️ .NET Core 2.0 SDK and later versions
NAME
dotnet new --install - installs a template package.
SYNOPSIS
dotnet new --install <PATH|NUGET_ID> [--interactive] [--nuget-source <SOURCE>]
DESCRIPTION
The dotnet new --install command installs a template package from the PATH or NUGET_ID provided. If you want to install a prerelease version of a template package, specify the version in the format <package- name>::<package-version>. By default, dotnet new passes * for the version, which represents the latest stable package version. For more information, see the Examples section. If a version of the template was already installed when you run this command, the template will be updat‐ ed to the specified version, or to the latest stable version if no version was specified. For informa‐ tion on creating custom templates, see Custom templates for dotnet new.
OPTIONS
• --interactive Allows the command to stop and wait for user input or action. For example, to complete authentication. Available since .NET 5.0 SDK. • --nuget-source <SOURCE> By default, dotnet new --install uses the hierarchy of NuGet configuration files from the current di‐ rectory to determine the NuGet source the package can be installed from. If --nuget-source is speci‐ fied, the source will be added to the list of sources to be checked. To check the configured sources for the current directory use dotnet nuget list source. For more in‐ formation, see Common NuGet Configurations
EXAMPLES
• Install the latest version of SPA templates for ASP.NET Core: dotnet new --install Microsoft.DotNet.Web.Spa.ProjectTemplates • Install version 2.0 of the SPA templates for ASP.NET Core: dotnet new --install Microsoft.DotNet.Web.Spa.ProjectTemplates::2.0.0 • Install version 2.0 of the SPA templates for ASP.NET Core from a custom NuGet source using interactive mode: dotnet new --install Microsoft.DotNet.Web.Spa.ProjectTemplates::2.0.0 --nuget-source "https://api.my-custom-nuget.com/v3/index.json" --interactive See also • dotnet new command • dotnet new –search option • Custom templates for dotnet new (1)