You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -114,14 +114,16 @@ For more information, see the following resources:
114
114
115
115
## Arguments
116
116
117
-
-**`PROJECT|SOLUTION`**
117
+
`PROJECT | SOLUTION | FILE`
118
118
119
-
The project or solution to publish.
119
+
The project or solution or C# (file-based program) file to operate on. If a file isn't specified, MSBuild searches the current directory for a project or solution.
120
120
121
121
*`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.
122
122
123
123
*`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.
124
124
125
+
*`FILE` is the path and filename of a file-based app. Files-based apps are programs 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).
126
+
125
127
## Options
126
128
127
129
[!INCLUDE [arch](../../../includes/cli-arch.md)]
@@ -268,6 +270,12 @@ For more information, see the following resources:
268
270
dotnet publish --no-dependencies
269
271
```
270
272
273
+
- Publish the file-based C# program *app.cs* in the current directory:
0 commit comments