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
This environment variable is used only when running apps via generated executables (apphosts).
285
-
\f[V]DOTNET_ROOT(x86)\f[R] is used instead when running a 32-bit executable on a 64-bit OS.
286
-
\f[V]DOTNET_ROOT_X64\f[R] is used instead when running a 64-bit executable on an ARM64 OS.
284
+
These environment variables are used only when running apps via generated executables (apphosts).
285
+
The order in which the environment variables are considered is:
286
+
.IP"1."3
287
+
\f[V]DOTNET_ROOT_<ARCH>\f[R], where \f[V]<ARCH>\f[R] is the architecture of the running executable (apphost).
288
+
For example:
289
+
.RS4
290
+
.IP\[bu]2
291
+
\f[V]DOTNET_ROOT_ARM64\f[R] is used for an Arm64 process.
292
+
.IP\[bu]2
293
+
\f[V]DOTNET_ROOT_X64\f[R] is used for an x64 process.
294
+
This process might be running on x64 or Arm64 architecture.
295
+
.IP\[bu]2
296
+
\f[V]DOTNET_ROOT_X86\f[R] is used for an x86 process.
297
+
This process might be running on x86 or x64 architecture.
298
+
.RE
299
+
.IP"2."3
300
+
\f[V]DOTNET_ROOT(x86)\f[R] is used when a 32-bit process is running on 64-bit Windows.
301
+
In other cases, this environment variable is ignored.
302
+
.IP"3."3
303
+
\f[V]DOTNET_ROOT\f[R].
287
304
.SS\f[V]DOTNET_HOST_PATH\f[R]
288
305
.PP
289
306
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.
@@ -508,18 +525,20 @@ For more information, see Advertising manifests.
508
525
.PP
509
526
Specifies whether .NET SDK local tools search for tool manifest files in the root folder on Windows.
510
527
The default is \f[V]false\f[R].
511
-
.SS\f[V]COREHOST_TRACE\f[R]
528
+
.SS\f[V]DOTNET_HOST_TRACE\f[R]
529
+
.PP
530
+
\f[B]Thisvariableappliesto.NET10andlaterversions.\f[R] For older versions, replace the \f[V]DOTNET_HOST_\f[R] prefix with \f[V]COREHOST_\f[R].
512
531
.PP
513
532
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].
514
533
.IP\[bu]2
515
-
\f[V]COREHOST_TRACE=[0/1]\f[R] - default is \f[V]0\f[R] - tracing disabled.
534
+
\f[V]DOTNET_HOST_TRACE=[0/1]\f[R] - default is \f[V]0\f[R] - tracing disabled.
516
535
If set to \f[V]1\f[R], diagnostics tracing is enabled.
517
536
.IP\[bu]2
518
-
\f[V]COREHOST_TRACEFILE=<file path>\f[R] - has an effect only if tracing is enabled by setting \f[V]COREHOST_TRACE=1\f[R].
537
+
\f[V]DOTNET_HOST_TRACEFILE=<file path>\f[R] - has an effect only if tracing is enabled by setting \f[V]DOTNET_HOST_TRACE=1\f[R].
519
538
When set, the tracing information is written to the specified file; otherwise, the trace information is written to \f[V]stderr\f[R].
520
539
.IP\[bu]2
521
-
\f[V]COREHOST_TRACE_VERBOSITY=[1/2/3/4]\f[R] - default is \f[V]4\f[R].
522
-
The setting is used only when tracing is enabled via \f[V]COREHOST_TRACE=1\f[R].
540
+
\f[V]DOTNET_HOST_TRACE_VERBOSITY=[1/2/3/4]\f[R] - default is \f[V]4\f[R].
541
+
The setting is used only when tracing is enabled via \f[V]DOTNET_HOST_TRACE=1\f[R].
523
542
.RS2
524
543
.IP\[bu]2
525
544
\f[V]4\f[R] - all tracing information is written
@@ -531,8 +550,22 @@ The setting is used only when tracing is enabled via \f[V]COREHOST_TRACE=1\f[R].
531
550
\f[V]1\f[R] - only error messages are written
532
551
.RE
533
552
.PP
534
-
The typical way to get detailed trace information about application startup is to set \f[V]COREHOST_TRACE=1\f[R] and\f[V]COREHOST_TRACEFILE=host_trace.txt\f[R] and then run the application.
553
+
The typical way to get detailed trace information about application startup is to set \f[V]DOTNET_HOST_TRACE=1\f[R] and\f[V]DOTNET_HOST_TRACEFILE=host_trace.txt\f[R] and then run the application.
535
554
A new file \f[V]host_trace.txt\f[R] will be created in the current directory with the detailed information.
555
+
.SS\f[V]COREHOST_TRACE\f[R]
556
+
.PP
557
+
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].
558
+
.RS
559
+
.PP
560
+
Starting with .NET 10, use the \f[V]DOTNET_HOST_TRACE\f[R] environment variables instead.
561
+
The \f[V]COREHOST_TRACE\f[R] variables work the same as \f[V]DOTNET_HOST_TRACE\f[R] variables.
562
+
.RE
563
+
.IP\[bu]2
564
+
\f[V]COREHOST_TRACE\f[R] - see \f[V]DOTNET_HOST_TRACE\f[R].
565
+
.IP\[bu]2
566
+
\f[V]COREHOST_TRACEFILE\f[R] - see \f[V]DOTNET_HOST_TRACEFILE\f[R].
567
+
.IP\[bu]2
568
+
\f[V]COREHOST_TRACE_VERBOSITY\f[R] - see \f[V]DOTNET_HOST_TRACE_VERBOSITY\f[R].
536
569
.SS\f[V]SuppressNETCoreSdkPreviewMessage\f[R]
537
570
.PP
538
571
If set to \f[V]true\f[R], invoking \f[V]dotnet\f[R] won\[cq]t produce a warning when a preview SDK is being used.
For more information about the available options, see the MSBuild command-line reference.
42
42
.PP
43
43
The dotnet build command is equivalent to \f[V]dotnet msbuild -restore\f[R].
44
-
When you don\[cq]t want to build the project and you have a specific target you want to run, use \f[V]dotnet build\f[R] or \f[V]dotnet msbuild\f[R] and specify the target.
The \f[V]dotnet nuget verify\f[R] command verifies a signed NuGet package.
42
+
In .NET 10 and later versions, the command also outputs the package\[cq]s content hash, which might be useful to investigate lock file validation errors.
42
43
.RS
43
44
.PP
44
45
This command requires a certificate root store that is valid for both code signing and timestamping.
The \f[V]dotnet nuget why\f[R] command shows the dependency graph for a particular package for a given project or solution.
37
37
.PP
38
-
Starting from the .NET 9 SDK, it\[cq]s possible to pass a NuGet assets file in place of the project file, in order to use the command with projects that can\[cq]t be restored with the .NET SDK.
39
-
First, restore the project in Visual Studio, or \f[V]msbuild.exe\f[R].
40
-
By default the assets file is in the project\[cq]s \f[V]obj\[rs]\f[R] directory, but you can find the location with \f[V]msbuild.exe path\[rs]to\[rs]project.proj -getProperty:ProjectAssetsFile\f[R].
41
-
Finally, run \f[V]dotnet nuget why path\[rs]to\[rs]project.assets.json SomePackage\f[R].
42
-
.PP
43
38
Starting with version 9.0.200, the command introduces support for runtime identifier (RID) specific packages by generating separate dependency trees for each RID and framework combination.
44
39
For example, if a project targets \f[V]net9.0\f[R] with the \f[V]win-x64\f[R] RID, the command generates trees for \f[V]net9.0/win-x64\f[R] and \f[V]net9.0\f[R].
40
+
.SS Older project format
41
+
.PP
42
+
To use the command with projects that can\[cq]t be restored with the .NET SDK, you can pass a NuGet assets file in place of the project file (starting with the .NET 9 SDK):
43
+
.IP"1."3
44
+
First, restore the project in Visual Studio or using \f[V]msbuild.exe\f[R].
45
+
By default, the assets file is in the project\[cq]s \f[V]obj\[rs]\f[R] directory, but you can find the location with \f[V]msbuild.exe path\[rs]to\[rs]project.proj -getProperty:ProjectAssetsFile\f[R].
46
+
.IP"2."3
47
+
Run \f[V]dotnet nuget why path\[rs]to\[rs]project.assets.json SomePackage\f[R].
0 commit comments