1dotnet-new-update(1)          .NET Documentation          dotnet-new-update(1)
2
3
4

dotnet new update

6       This article applies to: ✔️ .NET Core 3.1 SDK and later versions
7

NAME

9       dotnet-new-update - updates installed template packages.
10

SYNOPSIS

12              dotnet new update [--interactive] [--add-source|--nuget-source <SOURCE>]
13                  [-d|--diagnostics] [--verbosity <LEVEL>] [-h|--help]
14
15              dotnet new update --check-only|--dry-run [--interactive] [--add-source|--nuget-source <SOURCE>]
16                  [-d|--diagnostics] [--verbosity <LEVEL>] [-h|--help]
17

DESCRIPTION

19       The dotnet new update command updates installed template packages.  The
20       dotnet new update command with --check-only option checks for available
21       updates for installed template packages without applying them.
22
23       Starting with the .NET 7 SDK, the dotnet new syntax has changed:
24
25       • The --list, --search, --install, and --uninstall options became list,
26         search, install and uninstall subcommands.
27
28       • The --update-apply option became the update subcommand.
29
30       • To use --update-check, use the update subcommand with the --check-on‐
31         ly option.
32
33       Other  options  that  were  available before are still available to use
34       with their respective subcommands.  Separate help for  each  subcommand
35       is  available  via  the  -h  or  --help option: dotnet new <subcommand>
36       --help lists all supported options for the subcommand.
37
38       Additionally, tab completion is now available for dotnet new.  It  sup‐
39       ports completion for installed template names and for the options a se‐
40       lected template provides.  To activate tab completion for the .NET SDK,
41       see  Enable tab completion.  > > Examples of the old syntax: > > - Show
42       help for the update subcommand.  > > - Check for updates for  installed
43       template  packages: > > dotnetcli >   dotnet new --update-check > > > -
44       Update installed template packages: > > dotnetcli >   dotnet new  --up‐
45       date-apply >
46

OPTIONS

48--interactive
49
50         Allows  the  command  to stop and wait for user input or action.  For
51         example, to complete authentication.  Available since .NET 5.0 SDK.
52
53--add-source|nuget-source <SOURCE>
54
55         By default, dotnet new install uses the hierarchy of NuGet configura‐
56         tion  files  from the current directory to determine the NuGet source
57         the package can be installed from.  If --nuget-source  is  specified,
58         the source will be added to the list of sources to be checked.
59         To  check the configured sources for the current directory use dotnet
60         nuget list source.  For more information, see Common NuGet Configura‐
61         tions.  Available since .NET SDK 7.0.100.
62
63-d|--diagnostics
64
65         Enables diagnostic output.  Available since .NET SDK 7.0.100.
66
67-h|--help
68
69         Prints  out  help  for  the update command.  Available since .NET SDK
70         7.0.100.
71
72-v|--verbosity <LEVEL>
73
74         Sets the verbosity level of the command.  Allowed values are q[uiet],
75         m[inimal],  n[ormal],  and  diag[nostic].   Available  since .NET SDK
76         7.0.100.
77

EXAMPLES

79       • Updates the installed template packages using NuGet configuration for
80         the current directory:
81
82                dotnet new update
83
84       • Updates  the installed template packages also checking a custom NuGet
85         source using interactive mode:
86
87                dotnet new update --add-source "https://api.my-custom-nuget.com/v3/index.json" --interactive
88

SEE ALSO

90       • dotnet new command
91
92       • dotnet new search command
93
94       • dotnet new install command
95
96       • Custom templates for dotnet new
97
98
99
100                                  2022-11-08              dotnet-new-update(1)
Impressum