Skip to content

Commit a2ef142

Browse files
authored
apply changes from review feedback
1 parent 3937765 commit a2ef142

File tree

5 files changed

+28
-16
lines changed

5 files changed

+28
-16
lines changed

docs/core/tools/dotnet-build.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.date: 09/24/2025
99

1010
## Name
1111

12-
`dotnet build` - Builds a project, solution, or file-based program and all of its dependencies.
12+
`dotnet build` - Builds a project, solution, or file-based app and all of its dependencies.
1313

1414
## Synopsis
1515

@@ -32,7 +32,7 @@ dotnet build -h|--help
3232

3333
## Description
3434

35-
The `dotnet build` command builds the project, solution, or file-based program and its dependencies into a set of binaries. The binaries include the project's code in Intermediate Language (IL) files with a *.dll* extension. Depending on the project type and settings, other files may be included, such as:
35+
The `dotnet build` command builds the project, solution, or file-based app and its dependencies into a set of binaries. The binaries include the project's code in Intermediate Language (IL) files with a *.dll* extension. Depending on the project type and settings, other files may be included, such as:
3636

3737
- An executable that can be used to run the application.
3838
- Symbol files used for debugging with a *.pdb* extension.
@@ -62,7 +62,7 @@ To produce a library, omit the `<OutputType>` property or change its value to `L
6262

6363
### MSBuild
6464

65-
`dotnet build` uses MSBuild to build the project, solution, or file-based program. It supports both parallel and incremental builds. For more information, see [Incremental Builds](/visualstudio/msbuild/incremental-builds).
65+
`dotnet build` uses MSBuild to build the project, solution, or file-based app. It supports both parallel and incremental builds. For more information, see [Incremental Builds](/visualstudio/msbuild/incremental-builds).
6666

6767
In addition to its options, the `dotnet build` command accepts MSBuild options, such as `-p` for setting properties or `-l` to define a logger. For more information about these options, see the [MSBuild Command-Line Reference](/visualstudio/msbuild/msbuild-command-line-reference). Or you can also use the [dotnet msbuild](dotnet-msbuild.md) command.
6868

@@ -77,13 +77,13 @@ Running `dotnet build` is equivalent to running `dotnet msbuild -restore`; howev
7777

7878
`PROJECT | SOLUTION | FILE`
7979

80-
The project or solution or C# (file-based program) file to publish. If a file isn't specified, MSBuild searches the current directory for a project or solution.
80+
The project or solution or C# (file-based app) file to build. If a file isn't specified, MSBuild searches the current directory for a project or solution.
8181

8282
- `PROJECT` 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.
8383

8484
- `SOLUTION` is the path and filename of a solution file (*.sln* or *.slnx* extension), or the path to a directory that contains a solution file.
8585

86-
- `FILE` is an argument added in .NET 10. The path and filename of a file-based program. File-based programs are contained within a single `*.cs` file that are built and run without a corresponding project (`*.csproj`) file. For more information, see [Build file-based C# programs](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
86+
- `FILE` 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 (`*.csproj`) file. For more information, see [Build file-based C# programs](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
8787

8888
## Options
8989

@@ -180,13 +180,13 @@ The project or solution or C# (file-based program) file to publish. If a file is
180180
dotnet build
181181
```
182182

183-
- Build a file-based program:
183+
- Build a file-based app:
184184

185185
```dotnetcli
186186
dotnet build MyProject.cs
187187
```
188188

189-
File-based program support was added in .NET SDK 10.0.100.
189+
File-based app support was added in .NET SDK 10.0.100.
190190

191191
- Build a project and its dependencies using Release configuration:
192192

docs/core/tools/dotnet-clean.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ The `dotnet clean` command cleans the output of the previous build. It's impleme
3232

3333
`PROJECT | SOLUTION | FILE`
3434

35-
The project or solution or C# (file-based program) file to publish. If a file isn't specified, MSBuild searches the current directory for a project or solution.
35+
The project or solution or C# (file-based app) file to clean. If a file isn't specified, MSBuild searches the current directory for a project or solution.
3636

3737
- `PROJECT` 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.
3838

3939
- `SOLUTION` is the path and filename of a solution file (*.sln* or *.slnx* extension), or the path to a directory that contains a solution file.
4040

41-
- `FILE` is an argument added in .NET 10. The path and filename of a file-based program. File-based programs are contained within a single `*.cs` file that are built and run without a corresponding project (`*.csproj`) file. For more information, see [Build file-based C# programs](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
41+
- `FILE` 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 (`*.csproj`) file. For more information, see [Build file-based C# apps](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
4242

4343
## Options
4444

@@ -88,7 +88,7 @@ The project or solution or C# (file-based program) file to publish. If a file is
8888
dotnet clean Program.cs.
8989
```
9090

91-
File-based program support was added in .NET SDK 10.0.100.
91+
File-based app support was added in .NET SDK 10.0.100.
9292

9393
- Clean a project built using the Release configuration:
9494

docs/core/tools/dotnet-publish.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ The project or solution or C# (file-based program) file to publish. If a file is
122122

123123
- `SOLUTION` is the path and filename of a solution file (*.sln* or *.slnx* extension), or the path to a directory that contains a solution file.
124124

125-
- `FILE` is an argument added in .NET 10. The path and filename of a file-based program. File-based programs are contained within a single `*.cs` file that are built and run without a corresponding project (`*.csproj`) file. For more information, see [Build file-based C# programs](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
125+
- `FILE` 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 (`*.csproj`) file. For more information, see [Build file-based C# apps](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
126126

127127
## Options
128128

docs/core/tools/dotnet-restore.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ There are three specific settings that `dotnet restore` ignores:
8888

8989
`PROJECT | SOLUTION | FILE`
9090

91-
The project or solution or C# (file-based program) file to restore. If a file isn't specified, MSBuild searches the current directory for a project or solution.
91+
The project or solution or C# (file-based app) file to restore. If a file isn't specified, MSBuild searches the current directory for a project or solution.
9292

9393
- `PROJECT` 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.
9494

9595
- `SOLUTION` is the path and filename of a solution file (*.sln* or *.slnx* extension), or the path to a directory that contains a solution file. If the directory is not specified, it defaults to the current directory.
9696

97-
- `FILE` is an argument added in .NET 10. The path and filename of a file-based program. File-based programs are contained within a single `*.cs` file that are built and run without a corresponding project (`*.csproj`) file. For more information, see [Build file-based C# programs](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
97+
- `FILE` 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 (`*.csproj`) file. For more information, see [Build file-based C# apps](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
9898

9999
## Options
100100

docs/core/tools/dotnet-run.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,19 @@ To run the application, the `dotnet run` command resolves the dependencies of th
8383

8484
- **`--file <FILE_PATH>`**
8585

86-
The path to the file-based program to run. This option can be passed as the first argument if there is no project in the current directory. For more information, see [Build file-based C# programs](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
86+
The path to the file-based app to run. This option can be passed as the first argument if there is no project in the current directory. For more information, see [Build file-based C# apps](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
87+
88+
On Unix, you can run file-based apps directly, using the source file name on the command line instead of `dotnet run`. First, ensure the file has execute permissions. Then, add a shebang line `#!` as the first line of the file, for example:
89+
90+
```csharp
91+
#!/usr/bin/env dotnet run
92+
```
93+
94+
Then you can run the file directly from the command line:
95+
96+
```bash
97+
./ConsoleApp.cs
98+
```
8799

88100
Introduced in .NET SDK 10.0.100.
89101

@@ -167,13 +179,13 @@ The environment is constructed in the same order as this list, so the `-e|--envi
167179
dotnet run
168180
```
169181

170-
- Run the specified file-based program with arguments:
182+
- Run the specified file-based app with arguments:
171183

172184
```dotnetcli
173185
dotnet run ConsoleApp.cs -- arg1 arg2
174186
```
175187

176-
File-based program support was added in .NET SDK 10.0.100.
188+
File-based app support was added in .NET SDK 10.0.100.
177189

178190
- Run the specified project:
179191

0 commit comments

Comments
 (0)