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
@@ -135,6 +139,15 @@ Defines the build configuration.
135
139
The default for most projects is \f[V]Debug\f[R], but you can override the build configuration settings in your project.
136
140
.RE
137
141
.IP\[bu]2
142
+
\f[B]\f[VB]--disable-build-servers\f[B]\f[R]
143
+
.RS2
144
+
.PP
145
+
Forces the command to ignore any persistent build servers.
146
+
This option provides a consistent way to disable all use of build caching, which forces a build from scratch.
147
+
A build that doesn\[cq]t rely on caches is useful when the caches might be corrupted or incorrect for some reason.
148
+
Available since .NET 7 SDK.
149
+
.RE
150
+
.IP\[bu]2
138
151
\f[B]\f[VB]-f|--framework <FRAMEWORK>\f[B]\f[R]
139
152
.RS2
140
153
.PP
@@ -203,6 +216,14 @@ Available since .NET 6 SDK.
203
216
Directory in which to place the built binaries.
204
217
If not specified, the default path is \f[V]./bin/<configuration>/<framework>/\f[R].
205
218
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.
219
+
.IP\[bu]2
220
+
\&.NET 7.0.200 SDK and later
221
+
.RS2
222
+
.PP
223
+
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.
224
+
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.
225
+
For more information, see Solution-level \f[V]--output\f[R] option no longer valid for build-related commands.
226
+
.RE
206
227
.RE
207
228
.IP\[bu]2
208
229
\f[B]\f[VB]--os <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.
@@ -229,7 +264,7 @@ If not specified, the default is to build for the current OS and architecture.
229
264
.PP
230
265
Publishes the .NET runtime with the application so the runtime doesn\[cq]t need to be installed on the target machine.
231
266
The default is \f[V]true\f[R] if a runtime identifier is specified.
232
-
Available since .NET 6 SDK.
267
+
Available since .NET 6.
233
268
.RE
234
269
.IP\[bu]2
235
270
\f[B]\f[VB]--source <SOURCE>\f[B]\f[R]
@@ -238,13 +273,43 @@ Available since .NET 6 SDK.
238
273
The URI of the NuGet package source to use during the restore operation.
239
274
.RE
240
275
.IP\[bu]2
276
+
\f[B]\f[VB]--tl [auto|on|off]\f[B]\f[R]
277
+
.RS2
278
+
.PP
279
+
Specifies whether the \f[I]terminallogger\f[R] should be used for the build output.
280
+
The default is \f[V]auto\f[R], which first verifies the environment before enabling terminal logging.
281
+
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.
282
+
\f[V]on\f[R] skips the environment check and enables terminal logging.
283
+
\f[V]off\f[R] skips the environment check and uses the default console logger.
284
+
.PP
285
+
The terminal logger shows you the restore phase followed by the build phase.
286
+
During each phase, the currently building projects appear at the bottom of the terminal.
287
+
Each project that\[cq]s building outputs both the MSBuild target currently being built and the amount of time spent on that target.
288
+
You can search this information to learn more about the build.
289
+
When a project is finished building, a single \[lq]build completed\[rq] section is written for that captures:
290
+
.IP\[bu]2
291
+
The name of the built project
292
+
.IP\[bu]2
293
+
The target framework (if multi-targeted)
294
+
.IP\[bu]2
295
+
The status of that build
296
+
.IP\[bu]2
297
+
The primary output of that build (which is hyperlinked)
298
+
.IP\[bu]2
299
+
Any diagnostics generated for that project
300
+
.PP
301
+
This option is available starting in .NET 8.
302
+
.RE
303
+
.IP\[bu]2
241
304
\f[B]\f[VB]-v|--verbosity <LEVEL>\f[B]\f[R]
242
305
.RS2
243
306
.PP
244
307
Sets the verbosity level of the command.
245
308
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].
246
309
The default is \f[V]minimal\f[R].
247
-
For more information, see <xref:Microsoft.Build.Framework.LoggerVerbosity>.
310
+
By default, MSBuild displays warnings and errors at all verbosity levels.
311
+
To exclude warnings, use \f[V]/property:WarningLevel=0\f[R].
312
+
For more information, see <xref:Microsoft.Build.Framework.LoggerVerbosity> and WarningLevel.
@@ -89,6 +89,14 @@ Doesn\[cq]t display the startup banner or the copyright message.
89
89
.PP
90
90
The directory that contains the build artifacts to clean.
91
91
Specify the \f[V]-f|--framework <FRAMEWORK>\f[R] switch with the output directory switch if you specified the framework when the project was built.
92
+
.IP\[bu]2
93
+
\&.NET 7.0.200 SDK and later
94
+
.RS2
95
+
.PP
96
+
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.
97
+
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.
98
+
For more information, see Solution-level \f[V]--output\f[R] option no longer valid for build-related commands.
@@ -171,8 +171,10 @@ The file format is independent of the file name extension.
171
171
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.
172
172
.PP
173
173
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.
174
+
.RE
174
175
.IP\[bu]2
175
176
\f[B]\f[VB]-i|--import <PATH>\f[B]\f[R]
177
+
.RS2
176
178
.PP
177
179
Imports the provided HTTPS development certificate into the local machine.
178
180
Requires that you also specify the \f[V]--clean\f[R] option, which clears out any existing HTTPS developer certificates.
\f[B]Thisarticleappliesto:\f[R]\[u2714]\[uFE0F] .NET Core 3.1 SDK and later versions
25
25
.PP
26
-
In this article, you\[cq]ll learn about the environment variables used by .NET SDK, .NET CLI, and .NET runtime.
26
+
In this article, you\[cq]ll learn about the environment variables used by .NET.
27
27
Some environment variables are used by the .NET runtime, while others are only used by the .NET SDK and .NET CLI.
28
-
Some environment variables are used by all.
28
+
Some environment variables are used by all three components.
29
29
.SS .NET runtime environment variables
30
30
.SS\f[V]DOTNET_SYSTEM_NET_HTTP_*\f[R]
31
31
.PP
@@ -257,9 +257,35 @@ By default trace information is accumulated in a circular buffer and the content
257
257
.PP
258
258
Specifies the location of the .NET runtimes, if they are not installed in the default location.
259
259
The default location on Windows is \f[V]C:\[rs]Program Files\[rs]dotnet\f[R].
260
-
The default location on Linux and macOS is \f[V]/usr/local/share/dotnet\f[R].
260
+
The default location on macOS is \f[V]/usr/local/share/dotnet\f[R].
261
+
The default location on Linux varies depending on distro and installment method.
262
+
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).
263
+
For more information, see the following resources:
This environment variable is used only when running apps via generated executables (apphosts).
262
272
\f[V]DOTNET_ROOT(x86)\f[R] is used instead when running a 32-bit executable on a 64-bit OS.
273
+
.SS\f[V]DOTNET_HOST_PATH\f[R]
274
+
.PP
275
+
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.
276
+
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.
277
+
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.
278
+
.PP
279
+
Tools that invoke \f[V]dotnet\f[R] during an SDK command should use the following algorithm to locate it:
280
+
.IP\[bu]2
281
+
if \f[V]DOTNET_HOST_PATH\f[R] is set, use that value directly
282
+
.IP\[bu]2
283
+
otherwise, rely on \f[V]dotnet\f[R] via the system\[cq]s \f[V]PATH\f[R]
284
+
.RS
285
+
.PP
286
+
\f[V]DOTNET_HOST_PATH\f[R] is not a general solution for locating the \f[V]dotnet\f[R] host.
287
+
It is only intended to be used by tools that are invoked by the .NET SDK.
288
+
.RE
263
289
.SS\f[V]NUGET_PACKAGES\f[R]
264
290
.PP
265
291
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
323
349
Disables minor version roll forward, if set to \f[V]0\f[R].
324
350
This setting is superseded in .NET Core 3.0 by \f[V]DOTNET_ROLL_FORWARD\f[R].
325
351
The new settings should be used instead.
352
+
.SS\f[V]DOTNET_CLI_FORCE_UTF8_ENCODING\f[R]
353
+
.PP
354
+
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.
355
+
For more information, see SDK no longer changes console encoding when finished.
326
356
.SS\f[V]DOTNET_CLI_UI_LANGUAGE\f[R]
327
357
.PP
328
358
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.
0 commit comments