From 307403d3f6f66bfc2265a409b3bde5ea2b37d37e Mon Sep 17 00:00:00 2001 From: Adeel <3840695+am11@users.noreply.github.com> Date: Wed, 25 Oct 2023 04:34:08 +0300 Subject: [PATCH 01/22] Update manpages for 8.0 --- .../manpages/sdk/dotnet-add-package.1 | 2 +- .../manpages/sdk/dotnet-add-reference.1 | 16 ++- .../manpages/sdk/dotnet-build-server.1 | 2 +- documentation/manpages/sdk/dotnet-build.1 | 75 ++++++++++++- documentation/manpages/sdk/dotnet-clean.1 | 10 +- documentation/manpages/sdk/dotnet-dev-certs.1 | 4 +- .../sdk/dotnet-environment-variables.7 | 44 +++++++- documentation/manpages/sdk/dotnet-format.1 | 2 +- documentation/manpages/sdk/dotnet-help.1 | 2 +- .../manpages/sdk/dotnet-list-package.1 | 65 ++++++++++- .../manpages/sdk/dotnet-list-reference.1 | 2 +- documentation/manpages/sdk/dotnet-migrate.1 | 2 +- documentation/manpages/sdk/dotnet-msbuild.1 | 2 +- .../manpages/sdk/dotnet-new-details.1 | 105 ++++++++++++++++++ .../manpages/sdk/dotnet-new-install.1 | 10 +- documentation/manpages/sdk/dotnet-new-list.1 | 4 +- .../manpages/sdk/dotnet-new-sdk-templates.7 | 103 ++++++++++++++--- .../manpages/sdk/dotnet-new-search.1 | 4 +- .../manpages/sdk/dotnet-new-uninstall.1 | 4 +- .../manpages/sdk/dotnet-new-update.1 | 4 +- documentation/manpages/sdk/dotnet-new.1 | 67 ++++++----- .../manpages/sdk/dotnet-nuget-add-source.1 | 2 +- .../manpages/sdk/dotnet-nuget-delete.1 | 10 +- .../sdk/dotnet-nuget-disable-source.1 | 2 +- .../manpages/sdk/dotnet-nuget-enable-source.1 | 2 +- .../manpages/sdk/dotnet-nuget-list-source.1 | 2 +- .../manpages/sdk/dotnet-nuget-locals.1 | 2 +- .../manpages/sdk/dotnet-nuget-push.1 | 27 +++-- .../manpages/sdk/dotnet-nuget-remove-source.1 | 2 +- .../manpages/sdk/dotnet-nuget-sign.1 | 9 +- .../manpages/sdk/dotnet-nuget-trust.1 | 5 +- .../manpages/sdk/dotnet-nuget-update-source.1 | 2 +- .../manpages/sdk/dotnet-nuget-verify.1 | 5 +- documentation/manpages/sdk/dotnet-pack.1 | 11 +- documentation/manpages/sdk/dotnet-publish.1 | 63 ++++++++++- .../manpages/sdk/dotnet-remove-package.1 | 2 +- .../manpages/sdk/dotnet-remove-reference.1 | 2 +- documentation/manpages/sdk/dotnet-restore.1 | 57 ++++++++-- documentation/manpages/sdk/dotnet-run.1 | 2 +- documentation/manpages/sdk/dotnet-sdk-check.1 | 41 ++++--- documentation/manpages/sdk/dotnet-sln.1 | 2 +- documentation/manpages/sdk/dotnet-store.1 | 2 +- documentation/manpages/sdk/dotnet-test.1 | 42 +++++-- .../manpages/sdk/dotnet-tool-install.1 | 54 ++++++++- documentation/manpages/sdk/dotnet-tool-list.1 | 30 ++++- .../manpages/sdk/dotnet-tool-restore.1 | 4 +- documentation/manpages/sdk/dotnet-tool-run.1 | 2 +- .../manpages/sdk/dotnet-tool-search.1 | 2 +- .../manpages/sdk/dotnet-tool-uninstall.1 | 12 +- .../manpages/sdk/dotnet-tool-update.1 | 17 ++- documentation/manpages/sdk/dotnet-vstest.1 | 2 +- documentation/manpages/sdk/dotnet-watch.1 | 32 ++++-- .../manpages/sdk/dotnet-workload-install.1 | 2 +- .../manpages/sdk/dotnet-workload-list.1 | 2 +- .../manpages/sdk/dotnet-workload-repair.1 | 2 +- .../manpages/sdk/dotnet-workload-restore.1 | 2 +- .../manpages/sdk/dotnet-workload-search.1 | 2 +- .../manpages/sdk/dotnet-workload-uninstall.1 | 2 +- .../manpages/sdk/dotnet-workload-update.1 | 2 +- documentation/manpages/sdk/dotnet-workload.1 | 2 +- documentation/manpages/sdk/dotnet.1 | 4 +- 61 files changed, 810 insertions(+), 188 deletions(-) create mode 100644 documentation/manpages/sdk/dotnet-new-details.1 diff --git a/documentation/manpages/sdk/dotnet-add-package.1 b/documentation/manpages/sdk/dotnet-add-package.1 index 8dd9f4cc931b..56296ebb2602 100644 --- a/documentation/manpages/sdk/dotnet-add-package.1 +++ b/documentation/manpages/sdk/dotnet-add-package.1 @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-add-package" "1" "2022-10-10" "" ".NET Documentation" +.TH "dotnet-add-package" "1" "2023-10-25" "" ".NET Documentation" .hy .SH dotnet add package .PP diff --git a/documentation/manpages/sdk/dotnet-add-reference.1 b/documentation/manpages/sdk/dotnet-add-reference.1 index f104749c4d79..abbd594ffd25 100644 --- a/documentation/manpages/sdk/dotnet-add-reference.1 +++ b/documentation/manpages/sdk/dotnet-add-reference.1 @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-add-reference" "1" "2022-10-10" "" ".NET Documentation" +.TH "dotnet-add-reference" "1" "2023-10-25" "" ".NET Documentation" .hy .SH dotnet add reference .PP @@ -46,6 +46,20 @@ After running the command, the \f[V]\f[R] elements are added t \f[R] .fi +.SS Add a reference to an assembly that isn\[cq]t in a project +.PP +There\[cq]s no CLI command to add a reference to an assembly that isn\[cq]t in a project or a package. +But you can do that by editing your \f[I].csproj\f[R] file and adding markup similar to the following example: +.IP +.nf +\f[C] + + + \[dq].\[rs]MyDLLFolder\[rs]MyAssembly.dll + + +\f[R] +.fi .SH ARGUMENTS .IP \[bu] 2 \f[B]\f[VB]PROJECT\f[B]\f[R] diff --git a/documentation/manpages/sdk/dotnet-build-server.1 b/documentation/manpages/sdk/dotnet-build-server.1 index 323c2855a2ff..054dbb05a50f 100644 --- a/documentation/manpages/sdk/dotnet-build-server.1 +++ b/documentation/manpages/sdk/dotnet-build-server.1 @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-build-server" "1" "2022-10-10" "" ".NET Documentation" +.TH "dotnet-build-server" "1" "2023-10-25" "" ".NET Documentation" .hy .SH dotnet build-server .PP diff --git a/documentation/manpages/sdk/dotnet-build.1 b/documentation/manpages/sdk/dotnet-build.1 index 20ad8124e925..ec60b6207728 100644 --- a/documentation/manpages/sdk/dotnet-build.1 +++ b/documentation/manpages/sdk/dotnet-build.1 @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-build" "1" "2022-10-21" "" ".NET Documentation" +.TH "dotnet-build" "1" "2023-10-25" "" ".NET Documentation" .hy .SH dotnet build .PP @@ -28,10 +28,14 @@ dotnet-build - Builds a project and all of its dependencies. \f[C] dotnet build [|] [-a|--arch ] [-c|--configuration ] [-f|--framework ] + [--disable-build-servers] [--force] [--interactive] [--no-dependencies] [--no-incremental] [--no-restore] [--nologo] [--no-self-contained] [--os ] - [-o|--output ] [-r|--runtime ] - [--self-contained [true|false]] [--source ] [--use-current-runtime, --ucr [true|false]] + [-o|--output ] + [-p|--property:=] + [-r|--runtime ] + [--self-contained [true|false]] [--source ] + [--tl [auto|on|off]] [--use-current-runtime, --ucr [true|false]] [-v|--verbosity ] [--version-suffix ] dotnet build -h|--help @@ -135,6 +139,15 @@ Defines the build configuration. The default for most projects is \f[V]Debug\f[R], but you can override the build configuration settings in your project. .RE .IP \[bu] 2 +\f[B]\f[VB]--disable-build-servers\f[B]\f[R] +.RS 2 +.PP +Forces the command to ignore any persistent build servers. +This option provides a consistent way to disable all use of build caching, which forces a build from scratch. +A build that doesn\[cq]t rely on caches is useful when the caches might be corrupted or incorrect for some reason. +Available since .NET 7 SDK. +.RE +.IP \[bu] 2 \f[B]\f[VB]-f|--framework \f[B]\f[R] .RS 2 .PP @@ -203,6 +216,14 @@ Available since .NET 6 SDK. Directory in which to place the built binaries. If not specified, the default path is \f[V]./bin///\f[R]. For projects with multiple target frameworks (via the \f[V]TargetFrameworks\f[R] property), you also need to define \f[V]--framework\f[R] when you specify this option. +.IP \[bu] 2 +\&.NET 7.0.200 SDK and later +.RS 2 +.PP +If you specify the \f[V]--output\f[R] option when running this command on a solution, the CLI will emit a warning (an error in 7.0.200) due to the unclear semantics of the output path. +The \f[V]--output\f[R] option is disallowed because all outputs of all built projects would be copied into the specified directory, which isn\[cq]t compatible with multi-targeted projects, as well as projects that have different versions of direct and transitive dependencies. +For more information, see Solution-level \f[V]--output\f[R] option no longer valid for build-related commands. +.RE .RE .IP \[bu] 2 \f[B]\f[VB]--os \f[B]\f[R] @@ -215,6 +236,20 @@ If you use this option, don\[cq]t use the \f[V]-r|--runtime\f[R] option. Available since .NET 6. .RE .IP \[bu] 2 +\f[B]\f[VB]-p|--property:=\f[B]\f[R] +.RS 2 +.PP +Sets one or more MSBuild properties. +Specify multiple properties delimited by semicolons or by repeating the option: +.IP +.nf +\f[C] +--property:=;= +--property:= --property:= +\f[R] +.fi +.RE +.IP \[bu] 2 \f[B]\f[VB]-r|--runtime \f[B]\f[R] .RS 2 .PP @@ -229,7 +264,7 @@ If not specified, the default is to build for the current OS and architecture. .PP Publishes the .NET runtime with the application so the runtime doesn\[cq]t need to be installed on the target machine. The default is \f[V]true\f[R] if a runtime identifier is specified. -Available since .NET 6 SDK. +Available since .NET 6. .RE .IP \[bu] 2 \f[B]\f[VB]--source \f[B]\f[R] @@ -238,13 +273,43 @@ Available since .NET 6 SDK. The URI of the NuGet package source to use during the restore operation. .RE .IP \[bu] 2 +\f[B]\f[VB]--tl [auto|on|off]\f[B]\f[R] +.RS 2 +.PP +Specifies whether the \f[I]terminal logger\f[R] should be used for the build output. +The default is \f[V]auto\f[R], which first verifies the environment before enabling terminal logging. +The environment check verifies that the terminal is capable of using modern output features and isn\[cq]t using a redirected standard output before enabling the new logger. +\f[V]on\f[R] skips the environment check and enables terminal logging. +\f[V]off\f[R] skips the environment check and uses the default console logger. +.PP +The terminal logger shows you the restore phase followed by the build phase. +During each phase, the currently building projects appear at the bottom of the terminal. +Each project that\[cq]s building outputs both the MSBuild target currently being built and the amount of time spent on that target. +You can search this information to learn more about the build. +When a project is finished building, a single \[lq]build completed\[rq] section is written for that captures: +.IP \[bu] 2 +The name of the built project +.IP \[bu] 2 +The target framework (if multi-targeted) +.IP \[bu] 2 +The status of that build +.IP \[bu] 2 +The primary output of that build (which is hyperlinked) +.IP \[bu] 2 +Any diagnostics generated for that project +.PP +This option is available starting in .NET 8. +.RE +.IP \[bu] 2 \f[B]\f[VB]-v|--verbosity \f[B]\f[R] .RS 2 .PP Sets the verbosity level of the command. Allowed values are \f[V]q[uiet]\f[R], \f[V]m[inimal]\f[R], \f[V]n[ormal]\f[R], \f[V]d[etailed]\f[R], and \f[V]diag[nostic]\f[R]. The default is \f[V]minimal\f[R]. -For more information, see . +By default, MSBuild displays warnings and errors at all verbosity levels. +To exclude warnings, use \f[V]/property:WarningLevel=0\f[R]. +For more information, see and WarningLevel. .RE .IP \[bu] 2 \f[B]\f[VB]--use-current-runtime, --ucr [true|false]\f[B]\f[R] diff --git a/documentation/manpages/sdk/dotnet-clean.1 b/documentation/manpages/sdk/dotnet-clean.1 index cc1000e3a901..9c24fa04623a 100644 --- a/documentation/manpages/sdk/dotnet-clean.1 +++ b/documentation/manpages/sdk/dotnet-clean.1 @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-clean" "1" "2022-10-10" "" ".NET Documentation" +.TH "dotnet-clean" "1" "2023-10-25" "" ".NET Documentation" .hy .SH dotnet clean .PP @@ -89,6 +89,14 @@ Doesn\[cq]t display the startup banner or the copyright message. .PP The directory that contains the build artifacts to clean. Specify the \f[V]-f|--framework \f[R] switch with the output directory switch if you specified the framework when the project was built. +.IP \[bu] 2 +\&.NET 7.0.200 SDK and later +.RS 2 +.PP +If you specify the \f[V]--output\f[R] option when running this command on a solution, the CLI will emit a warning (an error in 7.0.200) due to the unclear semantics of the output path. +The \f[V]--output\f[R] option is disallowed because all outputs of all built projects would be copied into the specified directory, which isn\[cq]t compatible with multi-targeted projects, as well as projects that have different versions of direct and transitive dependencies. +For more information, see Solution-level \f[V]--output\f[R] option no longer valid for build-related commands. +.RE .RE .IP \[bu] 2 \f[B]\f[VB]-r|--runtime \f[B]\f[R] diff --git a/documentation/manpages/sdk/dotnet-dev-certs.1 b/documentation/manpages/sdk/dotnet-dev-certs.1 index 26af672b66b3..1c2b92e4aa96 100644 --- a/documentation/manpages/sdk/dotnet-dev-certs.1 +++ b/documentation/manpages/sdk/dotnet-dev-certs.1 @@ -15,7 +15,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-dev-certs" "1" "2022-10-10" "" ".NET Documentation" +.TH "dotnet-dev-certs" "1" "2023-10-25" "" ".NET Documentation" .hy .SH dotnet dev-certs .PP @@ -171,8 +171,10 @@ The file format is independent of the file name extension. For example, if you specify \f[V]--format pfx\f[R] and \f[V]--export-path ./cert.pem\f[R], you\[cq]ll get a file named \f[I]cert.pem\f[R] in \f[V]PFX\f[R] format. .PP For information about the effect of this option when used with \f[V]--password\f[R], \f[V]--no-password\f[R], or without either of those options, see \[en]export-path earlier in this article. +.RE .IP \[bu] 2 \f[B]\f[VB]-i|--import \f[B]\f[R] +.RS 2 .PP Imports the provided HTTPS development certificate into the local machine. Requires that you also specify the \f[V]--clean\f[R] option, which clears out any existing HTTPS developer certificates. diff --git a/documentation/manpages/sdk/dotnet-environment-variables.7 b/documentation/manpages/sdk/dotnet-environment-variables.7 index 36d82d36ec8e..b5ce82b8886e 100644 --- a/documentation/manpages/sdk/dotnet-environment-variables.7 +++ b/documentation/manpages/sdk/dotnet-environment-variables.7 @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-environment-variables" "7" "2022-09-19" "" ".NET Documentation" +.TH "dotnet-environment-variables" "7" "2023-10-25" "" ".NET Documentation" .hy .SH NAME .PP @@ -23,9 +23,9 @@ dotnet-environment-variables - .NET environment variables .PP \f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET Core 3.1 SDK and later versions .PP -In this article, you\[cq]ll learn about the environment variables used by .NET SDK, .NET CLI, and .NET runtime. +In this article, you\[cq]ll learn about the environment variables used by .NET. Some environment variables are used by the .NET runtime, while others are only used by the .NET SDK and .NET CLI. -Some environment variables are used by all. +Some environment variables are used by all three components. .SS .NET runtime environment variables .SS \f[V]DOTNET_SYSTEM_NET_HTTP_*\f[R] .PP @@ -257,9 +257,35 @@ By default trace information is accumulated in a circular buffer and the content .PP Specifies the location of the .NET runtimes, if they are not installed in the default location. The default location on Windows is \f[V]C:\[rs]Program Files\[rs]dotnet\f[R]. -The default location on Linux and macOS is \f[V]/usr/local/share/dotnet\f[R]. +The default location on macOS is \f[V]/usr/local/share/dotnet\f[R]. +The default location on Linux varies depending on distro and installment method. +The default location on Ubuntu 22.04 is \f[V]/usr/share/dotnet\f[R] (when installed from \f[V]packages.microsoft.com\f[R]) or \f[V]/usr/lib/dotnet\f[R] (when installed from Jammy feed). +For more information, see the following resources: +.IP \[bu] 2 +Troubleshoot app launch failures +.IP \[bu] 2 +GitHub issue dotnet/core#7699 (https://github.com/dotnet/core/issues/7699) +.IP \[bu] 2 +GitHub issue dotnet/runtime#79237 (https://github.com/dotnet/runtime/issues/79237) +.PP This environment variable is used only when running apps via generated executables (apphosts). \f[V]DOTNET_ROOT(x86)\f[R] is used instead when running a 32-bit executable on a 64-bit OS. +.SS \f[V]DOTNET_HOST_PATH\f[R] +.PP +Specifies the absolute path to a \f[V]dotnet\f[R] host (\f[V]dotnet.exe\f[R] on Windows, \f[V]dotnet\f[R] on Linux and macOS) that was used to launch the currently-running \f[V]dotnet\f[R] process. +This is used by the .NET SDK to help tools that run during .NET SDK commands ensure they use the same \f[V]dotnet\f[R] runtime for any child \f[V]dotnet\f[R] processes they create for the duration of the command. +Tools and MSBuild Tasks within the SDK that invoke binaries via the \f[V]dotnet\f[R] host are expected to honor this environment variable to ensure a consistent experience. +.PP +Tools that invoke \f[V]dotnet\f[R] during an SDK command should use the following algorithm to locate it: +.IP \[bu] 2 +if \f[V]DOTNET_HOST_PATH\f[R] is set, use that value directly +.IP \[bu] 2 +otherwise, rely on \f[V]dotnet\f[R] via the system\[cq]s \f[V]PATH\f[R] +.RS +.PP +\f[V]DOTNET_HOST_PATH\f[R] is not a general solution for locating the \f[V]dotnet\f[R] host. +It is only intended to be used by tools that are invoked by the .NET SDK. +.RE .SS \f[V]NUGET_PACKAGES\f[R] .PP The global packages folder. @@ -323,6 +349,10 @@ For more information, see the \f[V]--roll-forward\f[R] option for the \f[V]dotne Disables minor version roll forward, if set to \f[V]0\f[R]. This setting is superseded in .NET Core 3.0 by \f[V]DOTNET_ROLL_FORWARD\f[R]. The new settings should be used instead. +.SS \f[V]DOTNET_CLI_FORCE_UTF8_ENCODING\f[R] +.PP +Forces the use of UTF-8 encoding in the console, even for older versions of Windows 10 that don\[cq]t fully support UTF-8. +For more information, see SDK no longer changes console encoding when finished. .SS \f[V]DOTNET_CLI_UI_LANGUAGE\f[R] .PP Sets the language of the CLI UI using a locale value such as \f[V]en-us\f[R]. @@ -366,8 +396,12 @@ For more information, see Advertising manifests. .SS \f[V]DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_INTERVAL_HOURS\f[R] .PP Specifies the minimum number of hours between background downloads of advertising manifests for workloads. -Default is \f[V]24\f[R] - no more frequently than once a day. +The default is \f[V]24\f[R], which is no more frequently than once a day. For more information, see Advertising manifests. +.SS \f[V]DOTNET_TOOLS_ALLOW_MANIFEST_IN_ROOT\f[R] +.PP +Specifies whether .NET SDK local tools search for tool manifest files in the root folder on Windows. +The default is \f[V]false\f[R]. .SS \f[V]COREHOST_TRACE\f[R] .PP Controls diagnostics tracing from the hosting components, such as \f[V]dotnet.exe\f[R], \f[V]hostfxr\f[R], and \f[V]hostpolicy\f[R]. diff --git a/documentation/manpages/sdk/dotnet-format.1 b/documentation/manpages/sdk/dotnet-format.1 index 07ea3aba8528..cb28edeca4f8 100644 --- a/documentation/manpages/sdk/dotnet-format.1 +++ b/documentation/manpages/sdk/dotnet-format.1 @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-format" "1" "2022-06-20" "" ".NET Documentation" +.TH "dotnet-format" "1" "2023-10-25" "" ".NET Documentation" .hy .SH dotnet format .PP diff --git a/documentation/manpages/sdk/dotnet-help.1 b/documentation/manpages/sdk/dotnet-help.1 index 96c60c5083ad..0bd7df09968d 100644 --- a/documentation/manpages/sdk/dotnet-help.1 +++ b/documentation/manpages/sdk/dotnet-help.1 @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-help" "1" "2022-10-10" "" ".NET Documentation" +.TH "dotnet-help" "1" "2023-10-25" "" ".NET Documentation" .hy .SH dotnet help reference .PP diff --git a/documentation/manpages/sdk/dotnet-list-package.1 b/documentation/manpages/sdk/dotnet-list-package.1 index efa252919cfb..2e3e95e5c22b 100644 --- a/documentation/manpages/sdk/dotnet-list-package.1 +++ b/documentation/manpages/sdk/dotnet-list-package.1 @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-list-package" "1" "2022-10-10" "" ".NET Documentation" +.TH "dotnet-list-package" "1" "2023-10-25" "" ".NET Documentation" .hy .SH dotnet list package .PP @@ -32,6 +32,8 @@ dotnet list [|] package [--config ] [--include-prerelease] [--include-transitive] [--interactive] [--outdated] [--source ] [-v|--verbosity ] [--vulnerable] + [--format ] + [--output-version ] dotnet list package -h|--help \f[R] @@ -192,6 +194,27 @@ Cannot be combined with \f[V]--deprecated\f[R] or \f[V]--outdated\f[R] options. Nuget.org is the source of information about vulnerabilities. For more information, see Vulnerabilities and How to Scan NuGet Packages for Security Vulnerabilities (https://devblogs.microsoft.com/nuget/how-to-scan-nuget-packages-for-security-vulnerabilities/). .RE +.IP \[bu] 2 +\f[B]\f[VB]--format \f[B]\f[R] +.RS 2 +.PP +Sets the report output format. +Allowed values are \f[V]console\f[R], \f[V]json\f[R]. +Defaults to \f[V]console\f[R]. +Available starting in .NET SDK 7.0.200. +.RE +.IP \[bu] 2 +\f[B]\f[VB]--output-version \f[B]\f[R] +.RS 2 +.PP +Sets the report output version. +Allowed value is \f[V]1\f[R]. +Defaults to \f[V]1\f[R]. +Requires the \f[V]--format json\f[R] option. +When a new JSON version is available, the command will produce the new format by default. +This option will let you specify that the command should produce an earlier format. +Available starting in .NET SDK 7.0.200. +.RE .SH EXAMPLES .IP \[bu] 2 List package references of a specific project: @@ -223,3 +246,43 @@ dotnet list package --framework netcoreapp3.0 \f[R] .fi .RE +.IP \[bu] 2 +List package references in machine readable json output format: +.RS 2 +.IP +.nf +\f[C] +dotnet list package --format json +\f[R] +.fi +.RE +.IP \[bu] 2 +List package references for a specific target framework in machine readable json output format: +.RS 2 +.IP +.nf +\f[C] + dotnet list package --framework netcoreapp3.0 --format json +\f[R] +.fi +.RE +.IP \[bu] 2 +Save machine readable json output of package references, including transitive dependency and vulnerability details into a file: +.RS 2 +.IP +.nf +\f[C] +dotnet list package --include-transitive --vulnerable --format json >> dependencyReport.json +\f[R] +.fi +.RE +.IP \[bu] 2 +List package references in machine readable json output format with output version 1: +.RS 2 +.IP +.nf +\f[C] +dotnet list package --format json --output-version 1 +\f[R] +.fi +.RE diff --git a/documentation/manpages/sdk/dotnet-list-reference.1 b/documentation/manpages/sdk/dotnet-list-reference.1 index 1130f7b4ec92..800d8ca3927a 100644 --- a/documentation/manpages/sdk/dotnet-list-reference.1 +++ b/documentation/manpages/sdk/dotnet-list-reference.1 @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-list-reference" "1" "2022-10-10" "" ".NET Documentation" +.TH "dotnet-list-reference" "1" "2023-10-25" "" ".NET Documentation" .hy .SH dotnet list reference .PP diff --git a/documentation/manpages/sdk/dotnet-migrate.1 b/documentation/manpages/sdk/dotnet-migrate.1 index f35dbc3f3952..71f8a11c471b 100644 --- a/documentation/manpages/sdk/dotnet-migrate.1 +++ b/documentation/manpages/sdk/dotnet-migrate.1 @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-migrate" "1" "2022-06-03" "" ".NET Documentation" +.TH "dotnet-migrate" "1" "2023-10-25" "" ".NET Documentation" .hy .SH dotnet migrate .PP diff --git a/documentation/manpages/sdk/dotnet-msbuild.1 b/documentation/manpages/sdk/dotnet-msbuild.1 index c97b0a03c9b7..3a152a3ac02e 100644 --- a/documentation/manpages/sdk/dotnet-msbuild.1 +++ b/documentation/manpages/sdk/dotnet-msbuild.1 @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-msbuild" "1" "2022-06-03" "" ".NET Documentation" +.TH "dotnet-msbuild" "1" "2023-10-25" "" ".NET Documentation" .hy .SH dotnet msbuild .PP diff --git a/documentation/manpages/sdk/dotnet-new-details.1 b/documentation/manpages/sdk/dotnet-new-details.1 new file mode 100644 index 000000000000..6f1b7be169f3 --- /dev/null +++ b/documentation/manpages/sdk/dotnet-new-details.1 @@ -0,0 +1,105 @@ +.\" Automatically generated by Pandoc 2.18 +.\" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} +.TH "dotnet-new-details" "1" "2023-10-25" "" ".NET Documentation" +.hy +.SH dotnet new details +.PP +\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET 8 preview 6 +.SH NAME +.PP +dotnet-new-details - Displays template package metadata. +.SH SYNOPSIS +.IP +.nf +\f[C] +dotnet new details [] [--interactive] [--add-source|--nuget-source ] + [--force] [-d|--diagnostics] [-h|--help] +\f[R] +.fi +.SH DESCRIPTION +.PP +The \f[V]dotnet new details\f[R] command displays the metadata of the template package from the package name provided. +By default, the command searches for the latest available version. +If the package is installed locally or is found on the official NuGet website, it also displays the templates that the package contains, otherwise it only displays basic metadata. +.SH ARGUMENTS +.IP \[bu] 2 +\f[B]\f[VB]PACKAGE_NAME\f[B]\f[R] +.RS 2 +.PP +The package identifier to display the details for. +.RE +.SH OPTIONS +.IP \[bu] 2 +\f[B]\f[VB]--add-source|--nuget-source \f[B]\f[R] +.RS 2 +.PP +By default, \f[V]dotnet new details\f[R] uses the hierarchy of NuGet configuration files from the current directory to determine the NuGet source the package can be installed from. +If \f[V]--nuget-source\f[R] is specified, the source is added to the list of sources to be checked. +To check the configured sources for the current directory use \f[V]dotnet nuget list source\f[R]. +For more information, see Common NuGet Configurations +.RE +.IP \[bu] 2 +\f[B]\f[VB]--interactive\f[B]\f[R] +.RS 2 +.PP +Allows the command to stop and wait for user input or action. +For example, to complete authentication. +.RE +.IP \[bu] 2 +\f[B]\f[VB]-d|--diagnostics\f[B]\f[R] +.RS 2 +.PP +Enables diagnostic output. +.RE +.IP \[bu] 2 +\f[B]\f[VB]-h|--help\f[B]\f[R] +.RS 2 +.PP +Displays help for the search command. +.RE +.SH EXAMPLES +.IP \[bu] 2 +Display package data from the latest version of NUnit templates: +.RS 2 +.IP +.nf +\f[C] +dotnet new details NUnit3.DotNetNew.Template +\f[R] +.fi +.RE +.IP \[bu] 2 +Display package data of the NUnit templates from a custom NuGet source using interactive mode: +.RS 2 +.IP +.nf +\f[C] +dotnet new details NUnit3.DotNetNew.Template --add-source \[dq]https://api.my-custom-nuget.com/v3/index.json\[dq] --interactive +\f[R] +.fi +.RE +.SH SEE ALSO +.IP \[bu] 2 +dotnet new command +.IP \[bu] 2 +dotnet new uninstall command +.IP \[bu] 2 +dotnet new list command +.IP \[bu] 2 +dotnet new search command +.IP \[bu] 2 +Custom templates for dotnet new diff --git a/documentation/manpages/sdk/dotnet-new-install.1 b/documentation/manpages/sdk/dotnet-new-install.1 index 0f902b6d9ae6..e62824844716 100644 --- a/documentation/manpages/sdk/dotnet-new-install.1 +++ b/documentation/manpages/sdk/dotnet-new-install.1 @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-new-install" "1" "2022-11-08" "" ".NET Documentation" +.TH "dotnet-new-install" "1" "2023-10-25" "" ".NET Documentation" .hy .SH dotnet new install .PP @@ -56,7 +56,7 @@ To use a template package installed in .NET SDK 6.0.100 or later in earlier .NET .PP Starting with the .NET 7 SDK, the \f[V]dotnet new\f[R] syntax has changed: .IP \[bu] 2 -The \f[V]--list\f[R], \f[V]--search\f[R], \f[V]--install\f[R], and \f[V]--uninstall\f[R] options became \f[V]list\f[R], \f[V]search\f[R], \f[V]install\f[R] and \f[V]uninstall\f[R] subcommands. +The \f[V]--list\f[R], \f[V]--search\f[R], \f[V]--install\f[R], and \f[V]--uninstall\f[R] options became \f[V]list\f[R], \f[V]search\f[R], \f[V]install\f[R], and \f[V]uninstall\f[R] subcommands. .IP \[bu] 2 The \f[V]--update-apply\f[R] option became the \f[V]update\f[R] subcommand. .IP \[bu] 2 @@ -90,6 +90,12 @@ If \f[V]--nuget-source\f[R] is specified, the source will be added to the list o .PD To check the configured sources for the current directory use \f[V]dotnet nuget list source\f[R]. For more information, see Common NuGet Configurations +.RS +.PP +Following NuGet\[cq]s Https Everywhere (https://devblogs.microsoft.com/nuget/https-everywhere/) initiative, \f[V]dotnet new\f[R] is phasing out \f[V]http\f[R] feeds. +If an \f[V]http\f[R] feed is passed, it isn\[cq]t queried for packages and a warning is displayed. +The \f[V]--force\f[R] option can be used to override this behavior if necessary. +.RE .RE .IP \[bu] 2 \f[B]\f[VB]-d|--diagnostics\f[B]\f[R] diff --git a/documentation/manpages/sdk/dotnet-new-list.1 b/documentation/manpages/sdk/dotnet-new-list.1 index 160b094b775b..f0948edf29c6 100644 --- a/documentation/manpages/sdk/dotnet-new-list.1 +++ b/documentation/manpages/sdk/dotnet-new-list.1 @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-new-list" "1" "2022-11-08" "" ".NET Documentation" +.TH "dotnet-new-list" "1" "2023-10-25" "" ".NET Documentation" .hy .SH dotnet new list .PP @@ -48,7 +48,7 @@ To force show all the templates, use the \f[V]--ignore-constraints\f[R] option. .PP Starting with the .NET 7 SDK, the \f[V]dotnet new\f[R] syntax has changed: .IP \[bu] 2 -The \f[V]--list\f[R], \f[V]--search\f[R], \f[V]--install\f[R], and \f[V]--uninstall\f[R] options became \f[V]list\f[R], \f[V]search\f[R], \f[V]install\f[R] and \f[V]uninstall\f[R] subcommands. +The \f[V]--list\f[R], \f[V]--search\f[R], \f[V]--install\f[R], and \f[V]--uninstall\f[R] options became \f[V]list\f[R], \f[V]search\f[R], \f[V]install\f[R], and \f[V]uninstall\f[R] subcommands. .IP \[bu] 2 The \f[V]--update-apply\f[R] option became the \f[V]update\f[R] subcommand. .IP \[bu] 2 diff --git a/documentation/manpages/sdk/dotnet-new-sdk-templates.7 b/documentation/manpages/sdk/dotnet-new-sdk-templates.7 index f8bf3b08c82c..9fd5e19e0fdb 100644 --- a/documentation/manpages/sdk/dotnet-new-sdk-templates.7 +++ b/documentation/manpages/sdk/dotnet-new-sdk-templates.7 @@ -15,7 +15,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-new-sdk-templates" "7" "2022-11-08" "" ".NET Documentation" +.TH "dotnet-new-sdk-templates" "7" "2023-10-25" "" ".NET Documentation" .hy .SH NAME .PP @@ -337,17 +337,6 @@ T}@T{ 2.0 T} T{ -ASP.NET Core with React.js and Redux -T}@T{ -\f[V]reactredux\f[R] -T}@T{ -[C#] -T}@T{ -Web/MVC/SPA -T}@T{ -2.0 -T} -T{ Razor Class Library T}@T{ \f[V]razorclasslib\f[R] @@ -365,11 +354,22 @@ T}@T{ T}@T{ [C#], F# T}@T{ -Web/WebAPI +Web/Web API/API/Service/WebAPI T}@T{ 1.0 T} T{ +ASP.NET Core API +T}@T{ +\f[V]webapiaot\f[R] +T}@T{ +[C#] +T}@T{ +Web/Web API/API/Service +T}@T{ +8.0 +T} +T{ ASP.NET Core gRPC Service T}@T{ \f[V]grpc\f[R] @@ -1655,6 +1655,56 @@ Doesn\[cq]t execute an implicit restore during project creation. Supports adding traditional Razor pages and Views in addition to components to this library. Available since .NET Core 3.0 SDK. .RE +.PP + * * * * * +.SS \f[V]webapiaot\f[R] +.PP +Creates a web API project with AOT publish enabled. +For more information, see Native AOT deployment and The Web API (Native AOT) template. +.IP \[bu] 2 +\f[B]\f[VB]--exclude-launch-settings\f[B]\f[R] +.RS 2 +.PP +Excludes \f[I]launchSettings.json\f[R] from the generated template. +.RE +.IP \[bu] 2 +\f[B]\f[VB]-f|--framework \f[B]\f[R] +.RS 2 +.PP +Specifies the framework to target. +.PP +The following table lists the default values according to the SDK version number you\[cq]re using: +.PP +.TS +tab(@); +l l. +T{ +SDK version +T}@T{ +Default value +T} +_ +T{ +8.0 +T}@T{ +\f[V]net8.0\f[R] +T} +.TE +.RE +.IP \[bu] 2 +\f[B]\f[VB]--no-restore\f[B]\f[R] +.RS 2 +.PP +Doesn\[cq]t execute an implicit restore during project creation. +.RE +.IP \[bu] 2 +\f[B]\f[VB]--use-program-main\f[B]\f[R] +.RS 2 +.PP +If specified, an explicit \f[V]Program\f[R] class and \f[V]Main\f[R] method will be used instead of top-level statements. +Available since .NET SDK 6.0.300. +Default value: \f[V]false\f[R]. +.RE .PP * * * * * .SS \f[V]webapi\f[R] @@ -1682,10 +1732,12 @@ Use with \f[V]IndividualB2C\f[R] authentication. The default value is \f[V]https://login.microsoftonline.com/tfp/\f[R]. .RE .IP \[bu] 2 -\f[B]\f[VB]-minimal\f[B]\f[R] +\f[B]\f[VB]-minimal|--use-minimal-apis\f[B]\f[R] .RS 2 .PP Create a project that uses the ASP.NET Core minimal API. +Default is \f[V]false\f[R], but this option is overridden by \f[V]--controllers\f[R]. +Since the default for \f[V]--controllers\f[R] is \f[V]false\f[R], entering \f[V]dotnet new webapi\f[R] without specifying either option creates a minimal API project. .RE .IP \[bu] 2 \f[B]\f[VB]-ssp|--susi-policy-id \f[B]\f[R] @@ -1711,6 +1763,14 @@ Use with \f[V]IndividualB2C\f[R] or \f[V]SingleOrg\f[R] authentication. The default value is \f[V]11111111-1111-1111-11111111111111111\f[R]. .RE .IP \[bu] 2 +\f[B]\f[VB]--controllers\f[B]\f[R], \f[B]\f[VB]--use-controllers\f[B]\f[R] +.RS 2 +.PP +Whether to use controllers instead of minimal APIs. +If both this option and \f[V]-minimal\f[R] are specified, this option overrides the value specified by \f[V]-minimal\f[R]. +Default is \f[V]false\f[R]. +.RE +.IP \[bu] 2 \f[B]\f[VB]--domain \f[B]\f[R] .RS 2 .PP @@ -1740,11 +1800,19 @@ Only applies to \f[V]SingleOrg\f[R] authentication. Excludes \f[I]launchSettings.json\f[R] from the generated template. .RE .IP \[bu] 2 +\f[B]\f[VB]--no-openapi\f[B]\f[R] +.RS 2 +.PP +Turns off OpenAPI (Swagger) support. +\f[V]AddSwaggerGen\f[R], \f[V]UseSwagger\f[R], and \f[V]UseSwaggerUI\f[R] aren\[cq]t called. +.RE +.IP \[bu] 2 \f[B]\f[VB]--no-https\f[B]\f[R] .RS 2 .PP Turns off HTTPS. -\f[V]app.UseHsts\f[R] and \f[V]app.UseHttpsRedirection\f[R] aren\[cq]t added to \f[V]Startup.Configure\f[R]. +No \f[I]https\f[R] launch profile is created in \f[V]launchSettings.json\f[R]. +\f[V]app.UseHsts\f[R] and \f[V]app.UseHttpsRedirection\f[R] aren\[cq]t called in \f[I]Program.cs\f[R]/\f[I]Startup.cs\f[R]. This option only applies if \f[V]IndividualB2C\f[R] or \f[V]SingleOrg\f[R] aren\[cq]t being used for authentication. .RE .IP \[bu] 2 @@ -1773,6 +1841,11 @@ Default value T} _ T{ +7.0 +T}@T{ +\f[V]net7.0\f[R] +T} +T{ 6.0 T}@T{ \f[V]net6.0\f[R] diff --git a/documentation/manpages/sdk/dotnet-new-search.1 b/documentation/manpages/sdk/dotnet-new-search.1 index 8e80011a0f2d..f904c1d09971 100644 --- a/documentation/manpages/sdk/dotnet-new-search.1 +++ b/documentation/manpages/sdk/dotnet-new-search.1 @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-new-search" "1" "2022-11-08" "" ".NET Documentation" +.TH "dotnet-new-search" "1" "2023-10-25" "" ".NET Documentation" .hy .SH dotnet new search .PP @@ -44,7 +44,7 @@ When the is specified, searches for templates containing the specified name. .PP Starting with the .NET 7 SDK, the \f[V]dotnet new\f[R] syntax has changed: .IP \[bu] 2 -The \f[V]--list\f[R], \f[V]--search\f[R], \f[V]--install\f[R], and \f[V]--uninstall\f[R] options became \f[V]list\f[R], \f[V]search\f[R], \f[V]install\f[R] and \f[V]uninstall\f[R] subcommands. +The \f[V]--list\f[R], \f[V]--search\f[R], \f[V]--install\f[R], and \f[V]--uninstall\f[R] options became \f[V]list\f[R], \f[V]search\f[R], \f[V]install\f[R], and \f[V]uninstall\f[R] subcommands. .IP \[bu] 2 The \f[V]--update-apply\f[R] option became the \f[V]update\f[R] subcommand. .IP \[bu] 2 diff --git a/documentation/manpages/sdk/dotnet-new-uninstall.1 b/documentation/manpages/sdk/dotnet-new-uninstall.1 index a8f52bc57a8b..a2dc561dfd43 100644 --- a/documentation/manpages/sdk/dotnet-new-uninstall.1 +++ b/documentation/manpages/sdk/dotnet-new-uninstall.1 @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-new-uninstall" "1" "2022-11-08" "" ".NET Documentation" +.TH "dotnet-new-uninstall" "1" "2023-10-25" "" ".NET Documentation" .hy .SH dotnet new uninstall .PP @@ -41,7 +41,7 @@ When specifying \f[V]NUGET_ID\f[R], don\[cq]t include the version number. .PP Starting with the .NET 7 SDK, the \f[V]dotnet new\f[R] syntax has changed: .IP \[bu] 2 -The \f[V]--list\f[R], \f[V]--search\f[R], \f[V]--install\f[R], and \f[V]--uninstall\f[R] options became \f[V]list\f[R], \f[V]search\f[R], \f[V]install\f[R] and \f[V]uninstall\f[R] subcommands. +The \f[V]--list\f[R], \f[V]--search\f[R], \f[V]--install\f[R], and \f[V]--uninstall\f[R] options became \f[V]list\f[R], \f[V]search\f[R], \f[V]install\f[R], and \f[V]uninstall\f[R] subcommands. .IP \[bu] 2 The \f[V]--update-apply\f[R] option became the \f[V]update\f[R] subcommand. .IP \[bu] 2 diff --git a/documentation/manpages/sdk/dotnet-new-update.1 b/documentation/manpages/sdk/dotnet-new-update.1 index 0f87e86e9861..05a237913b61 100644 --- a/documentation/manpages/sdk/dotnet-new-update.1 +++ b/documentation/manpages/sdk/dotnet-new-update.1 @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-new-update" "1" "2022-11-08" "" ".NET Documentation" +.TH "dotnet-new-update" "1" "2023-10-25" "" ".NET Documentation" .hy .SH dotnet new update .PP @@ -43,7 +43,7 @@ The \f[V]dotnet new update\f[R] command with \f[V]--check-only\f[R] option check .PP Starting with the .NET 7 SDK, the \f[V]dotnet new\f[R] syntax has changed: .IP \[bu] 2 -The \f[V]--list\f[R], \f[V]--search\f[R], \f[V]--install\f[R], and \f[V]--uninstall\f[R] options became \f[V]list\f[R], \f[V]search\f[R], \f[V]install\f[R] and \f[V]uninstall\f[R] subcommands. +The \f[V]--list\f[R], \f[V]--search\f[R], \f[V]--install\f[R], and \f[V]--uninstall\f[R] options became \f[V]list\f[R], \f[V]search\f[R], \f[V]install\f[R], and \f[V]uninstall\f[R] subcommands. .IP \[bu] 2 The \f[V]--update-apply\f[R] option became the \f[V]update\f[R] subcommand. .IP \[bu] 2 diff --git a/documentation/manpages/sdk/dotnet-new.1 b/documentation/manpages/sdk/dotnet-new.1 index 014d4ff7aa77..aba30cb7f9a3 100644 --- a/documentation/manpages/sdk/dotnet-new.1 +++ b/documentation/manpages/sdk/dotnet-new.1 @@ -15,7 +15,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-new" "1" "2022-11-08" "" ".NET Documentation" +.TH "dotnet-new" "1" "2023-10-25" "" ".NET Documentation" .hy .SH dotnet new