dotnet-new-install(1)
π dotnet-new-install β a whole manual page, but make it make sense π
okay bestie, so this is the dotnet-new-install(1) page from the .NET Documentation, and it's literally the one that teaches you how to install template packages. no cap.
This article applies to: βοΈ .NET Core 3.1 SDK and later versions
β¨ NAME β¨
dotnet-new-install β installs a template package. that's it. that's the whole job. π
πΈ SYNOPSIS πΈ
dotnet new install <PATH|NUGET_ID> [--interactive] [--add-source|--nuget-source <SOURCE>] [--force]
[-d|--diagnostics] [--verbosity <LEVEL>] [-h|--help]
π¦ DESCRIPTION π¦
so the dotnet new install command installs a template package from the PATH or NUGET_ID you hand it. simple queen behavior. π
if you wanna install a specific version or a prerelease version of a template package, you drop the version in like this: <package-name>::<package-version>. by default, dotnet new passes * for the version, and * literally means "gimme the latest stable package version, periodt". more deets in the Examples section, iykyk.
if a version of the template package was already installed when you run this command, the template package gets updated to the specified version. and if you didn't specify a version, it updates to the latest stable version. okay so here's the glow-up: starting with .NET SDK 6.0.100, if the argument specifies the version and that version of the NuGet package is already installed, it won't be reinstalled. if the argument is a PATH and it's already installed, it won't be reinstalled either. no duplicate installs, we don't do that here. π
prior to .NET SDK 6.0.100, template packages were managed individually for each .NET SDK version, patch versions included. like, for example, if you install the template package using dotnet new --install in .NET SDK 5.0.100, it will be installed only for .NET SDK 5.0.100. templates from the package won't be available in other .NET SDK versions installed on your machine. rip. π
starting with .NET SDK 6.0.100 though?? installed template packages are available in later .NET SDK versions installed on your machine. a template package installed in .NET SDK 6.0.100 will also be available in .NET SDK 6.0.101, .NET SDK 6.0.200, and so on. however (and this is the important part), these template packages won't be available in .NET SDK versions prior to .NET SDK 6.0.100. to use a template package installed in .NET SDK 6.0.100 or later in earlier .NET SDK versions, you need to install it using dotnet new install in that .NET SDK version. okay? okay. π«Ά
starting with the .NET 7 SDK, the dotnet new syntax changed. here's the tea:
- The
--list,--search,--install, and--uninstalloptions becamelist,search,install, anduninstallsubcommands. - The
--update-applyoption became theupdatesubcommand. - To use
--update-check, use theupdatesubcommand with the--check-onlyoption.
other options that were available before are still available to use with their respective subcommands. separate help for each subcommand is available via the -h or --help option: dotnet new <subcommand> --help lists all supported options for the subcommand. iconic.
additionally, tab completion is now available for dotnet new. it supports completion for installed template names and for the options a selected template provides. to activate tab completion for the .NET SDK, see Enable tab completion.
examples of old syntax:
- Install the latest version of Azure web jobs project template package:
dotnetcli
dotnet new --install Microsoft.Azure.WebJobs.ProjectTemplates
[!WARNING] Templates can run MSBuild code when triggered, don't install or run untrusted .NET templates. bestie. please. π¨ this is the one where you actually listen to me.
π ARGUMENTS π
<PATH|NUGET_ID>
the folder on the file system, or the NuGet package identifier, to install the template package from. dotnet new attempts to install the NuGet package from the NuGet sources available for the current working directory and the sources specified via the --add-source option. if you wanna install a specific version or prerelease version of a template package from a NuGet source, specify the version in the format <package-name>::<package-version>. slay. β¨
π OPTIONS π
--add-source|--nuget-source <SOURCE>β by default,dotnet new installuses the hierarchy of NuGet configuration files from the current directory to figure out which NuGet source the package can be installed from. if--nuget-sourceis specified, the source gets added to the list of sources to be checked. to check the configured sources for the current directory, usedotnet nuget list source. for more info, see Common NuGet Configurations.
following NuGet's Https Everywhere initiative (https://devblogs.microsoft.com/nuget/https-everywhere/),dotnet newis phasing out http feeds. if an http feed is passed, it isn't queried for packages and a warning is displayed. the--forceoption can be used to override this behavior if necessary. β οΈ
-d|--diagnosticsβ enables diagnostic output. available since .NET SDK 7.0.100.--forceβ allows installing template packages from the specified sources even if they would override a template package from another source. available since .NET SDK 7.0.100. use responsibly bestie π-h|--helpβ prints out help for theinstallcommand. available since .NET SDK 7.0.100.--interactiveβ allows the command to stop and wait for user input or action. for example, to complete authentication. available since .NET 5.0 SDK.-v|--verbosity <LEVEL>β sets the verbosity level of the command. allowed values areq[uiet],m[inimal],n[ormal], anddiag[nostic]. available since .NET SDK 7.0.100.
π 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 --add-source "https://api.my-custom-nuget.com/v3/index.json" --interactive
π SEE ALSO π
dotnet newcommanddotnet new searchcommand- Custom templates for
dotnet new
and that's the whole page, bestie!! go forth and install templates responsibly π
source + version: this is the .NET Documentation dotnet-new-install(1) page, dated 2025-10-30. that's the receipt. π§Ύβ¨
mwah, love u, see u in the next manpage π«Άπ¦πΈ
π¦ where this page comes from
- alpine 3.24: dotnet-doc 10.0.303-r2 Β· MIT
- centos-stream 10: dotnet-host 11.0.0~rc.2.26504.105-0.10.el10 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- centos-stream 9: dotnet-host 11.0.0~rc.2.26504.105-0.11.el9 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- fedora 43: dotnet-host 10.0.12-1.fc43
- fedora 43: dotnet-host 11.0.0~rc.1.26425.128-0.10.fc43 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- fedora 44: dotnet-host 10.0.12-1.fc44
- fedora 44: dotnet-host 10.0.4-1.fc44 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- fedora 44: dotnet-host 11.0.0~rc.1.26425.128-0.12.fc44 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- nixpkgs unstable: dotnet-vmr 11.0.0-rc.3
- ubuntu noble: dotnet-host-10.0 10.0.12-0ubuntu1~24.04.1
- ubuntu questing: dotnet-host-10.0 10.0.9-0ubuntu1~25.10.1
- ubuntu resolute: dotnet-host-10.0 10.0.12-0ubuntu1~26.04.1
- ubuntu resolute: dotnet-host-10.0 10.0.5-0ubuntu1 Β· MIT
- ubuntu stonking: dotnet-host-10.0 10.0.12-0ubuntu2 Β· MIT
- ubuntu stonking: dotnet-host-11.0 11.0.0~rc1-0ubuntu1 Β· MIT
- ubuntu stonking: dotnet-host-11.0 11.0.0~rc3-0ubuntu1~26.10.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms