diff --git a/documentation/manpages/sdk/dotnet-build.1 b/documentation/manpages/sdk/dotnet-build.1 index 99fe1e657990..fb7ce5950153 100644 --- a/documentation/manpages/sdk/dotnet-build.1 +++ b/documentation/manpages/sdk/dotnet-build.1 @@ -14,19 +14,19 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-build" "1" "2025-06-13" "" ".NET Documentation" +.TH "dotnet-build" "1" "2025-09-30" "" ".NET Documentation" .hy .SH dotnet build .PP -\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET Core 3.1 SDK and later versions +\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET 6 and later versions .SH NAME .PP -dotnet-build - Builds a project and all of its dependencies. +dotnet-build - Builds a project, solution, or file-based app and all of its dependencies. .SH SYNOPSIS .IP .nf \f[C] -dotnet build [|] [-a|--arch ] +dotnet build [||] [-a|--arch ] [--artifacts-path ] [-c|--configuration ] [-f|--framework ] [--disable-build-servers] @@ -35,7 +35,7 @@ dotnet build [|] [-a|--arch ] [-o|--output ] [-p|--property:=] [-r|--runtime ] - [--self-contained [true|false]] [--source ] + [-sc|--self-contained [true|false]] [--source ] [--tl:[auto|on|off]] [--use-current-runtime, --ucr [true|false]] [-v|--verbosity ] [--version-suffix ] @@ -44,11 +44,11 @@ dotnet build -h|--help .fi .SH DESCRIPTION .PP -The \f[V]dotnet build\f[R] command builds the project and its dependencies into a set of binaries. +The \f[V]dotnet build\f[R] command builds the project, solution, or file-based app and its dependencies into a set of binaries. The binaries include the project\[cq]s code in Intermediate Language (IL) files with a \f[I].dll\f[R] extension. Depending on the project type and settings, other files may be included, such as: .IP \[bu] 2 -An executable that can be used to run the application, if the project type is an executable targeting .NET Core 3.0 or later. +An executable that can be used to run the application. .IP \[bu] 2 Symbol files used for debugging with a \f[I].pdb\f[R] extension. .IP \[bu] 2 @@ -58,12 +58,6 @@ A \f[I].runtimeconfig.json\f[R] file, which specifies the shared runtime and its .IP \[bu] 2 Other libraries that the project depends on (via project references or NuGet package references). .PP -For executable projects targeting versions earlier than .NET Core 3.0, library dependencies from NuGet are typically NOT copied to the output folder. -They\[cq]re resolved from the NuGet global packages folder at run time. -With that in mind, the product of \f[V]dotnet build\f[R] isn\[cq]t ready to be transferred to another machine to run. -To create a version of the application that can be deployed, you need to publish it (for example, with the dotnet publish command). -For more information, see .NET Application Deployment. -.PP For executable projects targeting .NET Core 3.0 and later, library dependencies are copied to the output folder. This means that if there isn\[cq]t any other publish-specific logic (such as Web projects have), the build output should be deployable. .SS Implicit restore @@ -98,7 +92,8 @@ To produce a library, omit the \f[V]\f[R] property or change its val The IL DLL for a library doesn\[cq]t contain entry points and can\[cq]t be executed. .SS MSBuild .PP -\f[V]dotnet build\f[R] uses MSBuild to build the project, so it supports both parallel and incremental builds. +\f[V]dotnet build\f[R] uses MSBuild to build the project, solution, or file-based app. +It supports both parallel and incremental builds. For more information, see Incremental Builds. .PP In addition to its options, the \f[V]dotnet build\f[R] command accepts MSBuild options, such as \f[V]-p\f[R] for setting properties or \f[V]-l\f[R] to define a logger. @@ -117,10 +112,19 @@ If the download is still running when this command finishes, the download is sto For more information, see Advertising manifests. .SH ARGUMENTS .PP -\f[V]PROJECT | SOLUTION\f[R] +\f[V]PROJECT | SOLUTION | FILE\f[R] .PP -The project or solution file to build. -If a project or solution file isn\[cq]t specified, MSBuild searches the current working directory for a file that has a file extension that ends in either \f[I]proj\f[R] or \f[I]sln\f[R] and uses that file. +The project or solution or C# (file-based app) file to operate on. +If a file isn\[cq]t specified, MSBuild searches the current directory for a project or solution. +.IP \[bu] 2 +\f[V]PROJECT\f[R] is the path and filename of a C#, F#, or Visual Basic project file, or the path to a directory that contains a C#, F#, or Visual Basic project file. +.IP \[bu] 2 +\f[V]SOLUTION\f[R] is the path and filename of a solution file (\f[I].sln\f[R] or \f[I].slnx\f[R] extension), or the path to a directory that contains a solution file. +.IP \[bu] 2 +\f[V]FILE\f[R] is an argument added in .NET 10. +The path and filename of a file-based app. +File-based apps are contained within a single file that is built and run without a corresponding project (\f[I].csproj\f[R]) file. +For more information, see Build file-based C# apps. .SH OPTIONS .IP \[bu] 2 \f[B]\f[VB]-a|--arch \f[B]\f[R] @@ -285,13 +289,13 @@ The URI of the NuGet package source to use during the restore operation. \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. +Specifies whether \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. +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. @@ -348,6 +352,18 @@ dotnet build .fi .RE .IP \[bu] 2 +Build a file-based app: +.RS 2 +.IP +.nf +\f[C] +dotnet build MyProject.cs +\f[R] +.fi +.PP +File-based app support was added in .NET SDK 10.0.100. +.RE +.IP \[bu] 2 Build a project and its dependencies using Release configuration: .RS 2 .IP diff --git a/documentation/manpages/sdk/dotnet-clean.1 b/documentation/manpages/sdk/dotnet-clean.1 index a259f0fe2df5..d59683069976 100644 --- a/documentation/manpages/sdk/dotnet-clean.1 +++ b/documentation/manpages/sdk/dotnet-clean.1 @@ -14,11 +14,11 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-clean" "1" "2025-06-13" "" ".NET Documentation" +.TH "dotnet-clean" "1" "2025-09-30" "" ".NET Documentation" .hy .SH dotnet clean .PP -\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET Core 3.1 SDK and later versions +\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET 6 and later versions .SH NAME .PP dotnet-clean - Cleans the output of a project. @@ -26,7 +26,7 @@ dotnet-clean - Cleans the output of a project. .IP .nf \f[C] -dotnet clean [|] [--artifacts-path ] +dotnet clean [||] [--artifacts-path ] [-c|--configuration ] [-f|--framework ] [--interactive] [--nologo] [-o|--output ] @@ -44,10 +44,19 @@ Only the outputs created during the build are cleaned. Both intermediate (\f[I]obj\f[R]) and final output (\f[I]bin\f[R]) folders are cleaned. .SH ARGUMENTS .PP -\f[V]PROJECT | SOLUTION\f[R] +\f[V]PROJECT | SOLUTION | FILE\f[R] .PP -The MSBuild project or solution to clean. -If a project or solution file is not specified, MSBuild searches the current working directory for a file that has a file extension that ends in \f[I]proj\f[R] or \f[I]sln\f[R], and uses that file. +The project or solution or C# (file-based app) file to operate on. +If a file isn\[cq]t specified, MSBuild searches the current directory for a project or solution. +.IP \[bu] 2 +\f[V]PROJECT\f[R] is the path and filename of a C#, F#, or Visual Basic project file, or the path to a directory that contains a C#, F#, or Visual Basic project file. +.IP \[bu] 2 +\f[V]SOLUTION\f[R] is the path and filename of a solution file (\f[I].sln\f[R] or \f[I].slnx\f[R] extension), or the path to a directory that contains a solution file. +.IP \[bu] 2 +\f[V]FILE\f[R] is an argument added in .NET 10. +The path and filename of a file-based app. +File-based apps are contained within a single file that is built and run without a corresponding project (\f[I].csproj\f[R]) file. +For more information, see Build file-based C# apps. .SH OPTIONS .IP \[bu] 2 \f[B]\f[VB]--artifacts-path \f[B]\f[R] @@ -119,13 +128,13 @@ This is used when a self-contained deployment was created. \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. +Specifies whether \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. +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. @@ -164,6 +173,18 @@ dotnet clean .fi .RE .IP \[bu] 2 +Clean a file-based program: +.RS 2 +.IP +.nf +\f[C] +dotnet clean Program.cs. +\f[R] +.fi +.PP +File-based app support was added in .NET SDK 10.0.100. +.RE +.IP \[bu] 2 Clean a project built using the Release configuration: .RS 2 .IP diff --git a/documentation/manpages/sdk/dotnet-pack.1 b/documentation/manpages/sdk/dotnet-pack.1 index 729fa6810b4c..58e02e3e5683 100644 --- a/documentation/manpages/sdk/dotnet-pack.1 +++ b/documentation/manpages/sdk/dotnet-pack.1 @@ -15,7 +15,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-pack" "1" "2025-06-13" "" ".NET Documentation" +.TH "dotnet-pack" "1" "2025-09-30" "" ".NET Documentation" .hy .SH dotnet pack .PP @@ -202,13 +202,13 @@ For more information, see .NET Blog: .NET Framework 4.5.1 Supports Microsoft Sec \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. +Specifies whether \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. +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. diff --git a/documentation/manpages/sdk/dotnet-publish.1 b/documentation/manpages/sdk/dotnet-publish.1 index 64610ed45272..77da5ae6f4be 100644 --- a/documentation/manpages/sdk/dotnet-publish.1 +++ b/documentation/manpages/sdk/dotnet-publish.1 @@ -14,11 +14,11 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-publish" "1" "2025-08-29" "" ".NET Documentation" +.TH "dotnet-publish" "1" "2025-09-30" "" ".NET Documentation" .hy .SH dotnet publish .PP -\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET Core 3.1 SDK and later versions +\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET 6 and later versions .SH NAME .PP dotnet-publish - Publishes the application and its dependencies to a folder for deployment to a hosting system. @@ -26,7 +26,7 @@ dotnet-publish - Publishes the application and its dependencies to a folder for .IP .nf \f[C] -dotnet publish [|] [-a|--arch ] +dotnet publish [||] [-a|--arch ] [--artifacts-path ] [-c|--configuration ] [--disable-build-servers] [-f|--framework ] [--force] [--interactive] @@ -172,18 +172,20 @@ When you run this command, it initiates an asynchronous background download of a If the download is still running when this command finishes, the download is stopped. For more information, see Advertising manifests. .SH ARGUMENTS -.IP \[bu] 2 -\f[B]\f[VB]PROJECT|SOLUTION\f[B]\f[R] -.RS 2 .PP -The project or solution to publish. +\f[V]PROJECT | SOLUTION | FILE\f[R] +.PP +The project or solution or C# (file-based app) file to operate on. +If a file isn\[cq]t specified, MSBuild searches the current directory for a project or solution. .IP \[bu] 2 \f[V]PROJECT\f[R] is the path and filename of a C#, F#, or Visual Basic project file, or the path to a directory that contains a C#, F#, or Visual Basic project file. -If the directory is not specified, it defaults to the current directory. .IP \[bu] 2 \f[V]SOLUTION\f[R] is the path and filename of a solution file (\f[I].sln\f[R] or \f[I].slnx\f[R] extension), or the path to a directory that contains a solution file. -If the directory is not specified, it defaults to the current directory. -.RE +.IP \[bu] 2 +\f[V]FILE\f[R] is an argument added in .NET 10. +The path and filename of a file-based app. +File-based apps are contained within a single file that is built and run without a corresponding project (\f[I].csproj\f[R]) file. +For more information, see Build file-based C# apps. .SH OPTIONS .IP \[bu] 2 \f[B]\f[VB]-a|--arch \f[B]\f[R] @@ -320,15 +322,6 @@ If you specify a relative path when publishing a solution, all output for all pr To make publish output go to separate folders for each project, specify a relative path by using the msbuild \f[V]PublishDir\f[R] property instead of the \f[V]--output\f[R] option. For example, \f[V]dotnet publish -p:PublishDir=.\[rs]publish\f[R] sends publish output for each project to a \f[V]publish\f[R] folder under the folder that contains the project file. .RE -.IP \[bu] 2 -\&.NET Core 2.x SDK -.RS 2 -.PP -If you specify a relative path when publishing a project, the generated output directory is relative to the project file location, not to the current working directory. -.PP -If you specify a relative path when publishing a solution, each project\[cq]s output goes into a separate folder relative to the project file location. -If you specify an absolute path when publishing a solution, all publish output for all projects goes into the specified folder. -.RE .RE .IP \[bu] 2 \f[B]\f[VB]--os \f[B]\f[R] @@ -376,13 +369,13 @@ If you use this option, use \f[V]--self-contained\f[R] or \f[V]--no-self-contain \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. +Specifies whether \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. +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. @@ -491,6 +484,18 @@ dotnet publish --no-dependencies \f[R] .fi .RE +.IP \[bu] 2 +Publish the file-based C# program \f[I]app.cs\f[R] in the current directory: +.RS 2 +.IP +.nf +\f[C] +dotnet publish app.cs +\f[R] +.fi +.PP +File-based program support was added in .NET SDK 10.0.100. +.RE .SH SEE ALSO .IP \[bu] 2 \&.NET application publishing overview diff --git a/documentation/manpages/sdk/dotnet-restore.1 b/documentation/manpages/sdk/dotnet-restore.1 index 498f0b210e84..334fba4e4b17 100644 --- a/documentation/manpages/sdk/dotnet-restore.1 +++ b/documentation/manpages/sdk/dotnet-restore.1 @@ -14,11 +14,11 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-restore" "1" "2025-06-30" "" ".NET Documentation" +.TH "dotnet-restore" "1" "2025-09-30" "" ".NET Documentation" .hy .SH dotnet restore .PP -\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET Core 3.1 SDK and later versions +\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET 6 and later versions .SH NAME .PP dotnet-restore - Restores the dependencies and tools of a project. @@ -26,7 +26,7 @@ dotnet-restore - Restores the dependencies and tools of a project. .IP .nf \f[C] -dotnet restore [] [--configfile ] [--disable-build-servers] +dotnet restore [||] [--configfile ] [--disable-build-servers] [--disable-parallel] [-f|--force] [--force-evaluate] [--ignore-failed-sources] [--interactive] [--lock-file-path ] [--locked-mode] @@ -126,12 +126,20 @@ When you run this command, it initiates an asynchronous background download of a If the download is still running when this command finishes, the download is stopped. For more information, see Advertising manifests. .SH ARGUMENTS -.IP \[bu] 2 -\f[B]\f[VB]ROOT\f[B]\f[R] -.RS 2 .PP -Optional path to the project file to restore. -.RE +\f[V]PROJECT | SOLUTION | FILE\f[R] +.PP +The project or solution or C# (file-based app) file to operate on. +If a file isn\[cq]t specified, MSBuild searches the current directory for a project or solution. +.IP \[bu] 2 +\f[V]PROJECT\f[R] is the path and filename of a C#, F#, or Visual Basic project file, or the path to a directory that contains a C#, F#, or Visual Basic project file. +.IP \[bu] 2 +\f[V]SOLUTION\f[R] is the path and filename of a solution file (\f[I].sln\f[R] or \f[I].slnx\f[R] extension), or the path to a directory that contains a solution file. +.IP \[bu] 2 +\f[V]FILE\f[R] is an argument added in .NET 10. +The path and filename of a file-based app. +File-based apps are contained within a single file that is built and run without a corresponding project (\f[I].csproj\f[R]) file. +For more information, see Build file-based C# apps. .SH OPTIONS .IP \[bu] 2 \f[B]\f[VB]-a|--arch \f[B]\f[R] @@ -250,13 +258,13 @@ Multiple sources can be provided by specifying this option multiple times. \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. +Specifies whether \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. +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. diff --git a/documentation/manpages/sdk/dotnet-run.1 b/documentation/manpages/sdk/dotnet-run.1 index 65cf2e8d10a8..c37a294d9f89 100644 --- a/documentation/manpages/sdk/dotnet-run.1 +++ b/documentation/manpages/sdk/dotnet-run.1 @@ -14,11 +14,11 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-run" "1" "2025-06-13" "" ".NET Documentation" +.TH "dotnet-run" "1" "2025-09-30" "" ".NET Documentation" .hy .SH dotnet run .PP -\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET Core 3.1 SDK and later versions +\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET 6 and later versions .SH NAME .PP dotnet-run - Runs source code without any explicit compile or launch commands. @@ -26,8 +26,8 @@ dotnet-run - Runs source code without any explicit compile or launch commands. .IP .nf \f[C] -dotnet run [-a|--arch ] [-c|--configuration ] - [-e|--environment ] +dotnet run [] [-a|--arch ] [-c|--configuration ] + [-e|--environment ] [--file ] [-f|--framework ] [--force] [--interactive] [--launch-profile ] [--no-build] [--no-dependencies] [--no-launch-profile] [--no-restore] @@ -87,6 +87,14 @@ Short form options, such as \f[V]-s\f[R], are not supported. When you run this command, it initiates an asynchronous background download of advertising manifests for workloads. If the download is still running when this command finishes, the download is stopped. For more information, see Advertising manifests. +.SH ARGUMENTS +.PP +\f[V]\f[R] +.PP +Arguments passed to the application that is being run. +.PP +Any arguments that aren\[cq]t recognized by \f[V]dotnet run\f[R] are passed to the application. +To separate arguments for \f[V]dotnet run\f[R] from arguments for the application, use the \f[V]--\f[R] option. .SH OPTIONS .IP \[bu] 2 \f[B]\f[VB]--\f[B]\f[R] @@ -132,6 +140,34 @@ Builds and runs the app using the specified framework. The framework must be specified in the project file. .RE .IP \[bu] 2 +\f[B]\f[VB]--file \f[B]\f[R] +.RS 2 +.PP +The path to the file-based app to run. +If a path isn\[cq]t specified, the current directory is used to find and run the file. +For more information on file-based apps, see Build file-based C# apps. +.PP +On Unix, you can run file-based apps directly, using the source file name on the command line instead of \f[V]dotnet run\f[R]. +First, ensure the file has execute permissions. +Then, add a shebang line \f[V]#!\f[R] as the first line of the file, for example: +.IP +.nf +\f[C] +#!/usr/bin/env dotnet run +\f[R] +.fi +.PP +Then you can run the file directly from the command line: +.IP +.nf +\f[C] +\&./ConsoleApp.cs +\f[R] +.fi +.PP +Introduced in .NET SDK 10.0.100. +.RE +.IP \[bu] 2 \f[B]\f[VB]--force\f[B]\f[R] .RS 2 .PP @@ -245,13 +281,13 @@ For a list of Runtime Identifiers (RIDs), see the RID catalog. \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. +Specifies whether \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. +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. @@ -306,6 +342,18 @@ dotnet run .fi .RE .IP \[bu] 2 +Run the specified file-based app in the current directory: +.RS 2 +.IP +.nf +\f[C] +dotnet run --file ConsoleApp.cs +\f[R] +.fi +.PP +File-based app support was added in .NET SDK 10.0.100. +.RE +.IP \[bu] 2 Run the specified project: .RS 2 .IP @@ -345,3 +393,22 @@ dotnet run --verbosity m \f[R] .fi .RE +.IP \[bu] 2 +Run the project in the current directory using the specified framework and pass arguments to the application: +.RS 2 +.IP +.nf +\f[C] +dotnet run -f net6.0 -- arg1 arg2 +\f[R] +.fi +.PP +In the following example, three arguments are passed to the application. +One argument is passed using \f[V]-\f[R], and two arguments are passed after \f[V]--\f[R]: +.IP +.nf +\f[C] +dotnet run -f net6.0 -arg1 -- arg2 arg3 +\f[R] +.fi +.RE diff --git a/documentation/manpages/sdk/dotnet-watch.1 b/documentation/manpages/sdk/dotnet-watch.1 index 6a02e55593a9..538a5acd0632 100644 --- a/documentation/manpages/sdk/dotnet-watch.1 +++ b/documentation/manpages/sdk/dotnet-watch.1 @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "dotnet-watch" "1" "2025-06-13" "" ".NET Documentation" +.TH "dotnet-watch" "1" "2025-09-30" "" ".NET Documentation" .hy .SH dotnet watch .PP @@ -177,7 +177,7 @@ The class uses \f \f[B]\f[VB]DOTNET_WATCH_AUTO_RELOAD_WS_HOSTNAME\f[B]\f[R] .RS 2 .PP -As part of \f[V]dotnet watch\f[R], the browser refresh server mechanism reads this value to determine the WebSocket host environment's hostname. +As part of \f[V]dotnet watch\f[R], the browser refresh server mechanism reads this value to determine the WebSocket host environment. The value \f[V]127.0.0.1\f[R] is replaced by \f[V]localhost\f[R], and the \f[V]http://\f[R] and \f[V]https://\f[R] schemes are replaced with \f[V]ws://\f[R] and \f[V]wss://\f[R] respectively. .RE .IP \[bu] 2