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
Copy file name to clipboardExpand all lines: docs/core/tools/dotnet-environment-variables.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Environment variables used by .NET SDK, .NET CLI, and .NET runtime
3
3
description: Learn about the environment variables that you can use to configure the .NET SDK, .NET CLI, and .NET runtime.
4
-
ms.date: 07/19/2021
4
+
ms.date: 07/20/2021
5
5
---
6
6
# Environment variables used by .NET SDK, .NET CLI, and .NET runtime
7
7
@@ -94,6 +94,14 @@ Controls diagnostics tracing from the hosting components, such as `dotnet.exe`,
94
94
95
95
The typical way to get detailed trace information about application startup is to set `COREHOST_TRACE=1` and`COREHOST_TRACEFILE=host_trace.txt` and then run the application. A new file `host_trace.txt` will be created in the current directory with the detailed information.
96
96
97
+
## DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE
98
+
99
+
Disables background download of advertising manifests for workloads. Default is `false` - not disabled. If set to `true`, downloading is disabled. For more information, see [Advertising manifests](dotnet-workload-install.md#advertising-manifests).
Specifies the minimum number of hours between background downloads of advertising manifests for workloads. Default is `24` - no more frequently than once a day. For more information, see [Advertising manifests](dotnet-workload-install.md#advertising-manifests).
The `dotnet workload install` command installs an *optional workload*. Optional workloads can be installed on top of the .NET SDK to provide support for various application types, such as [.NET MAUI](/dotnet/maui/what-is-maui) and [Blazor WebAssembly AOT](https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-6-preview-4/#blazor-webassembly-ahead-of-time-aot-compilation).
29
+
The `dotnet workload install` command installs one or more *optional workloads*. Optional workloads can be installed on top of the .NET SDK to provide support for various application types, such as [.NET MAUI](/dotnet/maui/what-is-maui) and [Blazor WebAssembly AOT](https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-6-preview-4/#blazor-webassembly-ahead-of-time-aot-compilation).
30
30
31
31
Use [dotnet workload search](dotnet-workload-search.md) to learn what workloads are available to install.
32
32
33
-
The `dotnet workload install` command installs workload packs, which are packaged and hosted on Nuget.org. For macOS and Linux SDK installations that are installed to a protected directory, the command needs to run elevated. On Windows the command doesn't need to run elevated even if the SDK is installed to the *Program Files* directory. For Windows the command uses MSI installers for that location.
33
+
### When to run elevated
34
34
35
-
The `dotnet workload` commands operate in the context of specific SDK versions. Suppose you have both .NET 6.0.100 SDK and .NET 7.0.100 SDK installed. The `dotnet workload` commands will give different results depending on which SDK version you select. This behavior applies to major and minor version and feature band differences, not to patch version differences. For example, .NET SDK 6.0.101 and 6.0.102 give the same results, whereas 6.0.100 and 6.0.200 give different results.
35
+
For macOS and Linux SDK installations that are installed to a protected directory, the command needs to run elevated (use the `sudo` command). On Windows, the command doesn't need to run elevated even if the SDK is installed to the *Program Files* directory. For Windows, the command uses MSI installers for that location.
36
36
37
-
The commands provide the `--sdk-version` option to let you select an SDK version other than the one selected by default or by *global.json*.
37
+
### Results vary by SDK version
38
+
39
+
The `dotnet workload` commands operate in the context of specific SDK versions. Suppose you have both .NET 6.0.100 SDK and .NET 6.0.200 SDK installed. The `dotnet workload` commands will give different results depending on which SDK version you select. This behavior applies to major and minor version and feature band differences, not to patch version differences. For example, .NET SDK 6.0.101 and 6.0.102 give the same results, whereas 6.0.100 and 6.0.200 give different results. You can specify the SDK version by using the [*global.json* file](global-json.md) or the `--sdk-version` option of the `dotnet workload` commands.
40
+
41
+
### Advertising manifests
42
+
43
+
The names and versions of the assets that a workload installation requires are maintained in *manifests*. By default, the `dotnet workload install` command downloads the latest available manifests before it installs a workload. The local copy of a manifest then provides the information needed to find and download the assets for a workload.
44
+
45
+
The `dotnet workload list` command compares the versions of installed workloads with the currently available versions. When it finds that a version newer than the installed version is available, it advertises that fact in the command output. These newer-version notifications in `dotnet workload list` are available starting in .NET 6 Preview 7.
46
+
47
+
To enable these notifications, the latest available versions of the manifests are downloaded and stored as *advertising manifests*. These downloads happen asynchronously in the background when any of the following commands are run.
48
+
49
+
*[dotnet build](dotnet-build.md)
50
+
*[dotnet pack](dotnet-pack.md)
51
+
*[dotnet publish](dotnet-publish.md)
52
+
*[dotnet restore](dotnet-restore.md)
53
+
*[dotnet run](dotnet-run.md)
54
+
*[dotnet test](dotnet-test.md)
55
+
56
+
If a command finishes before the manifest download finishes, the download is stopped. The download is tried again the next time one of these commands is run. You can set environment variables to [disable these background downloads](dotnet-environment-variables.md#dotnet_cli_workload_update_notify_disable) or [control their frequency](dotnet-environment-variables.md#dotnet_cli_workload_update_notify_interval_hours). By default, they don't happen more than once a day.
57
+
58
+
You can prevent the `dotnet workload install` command from doing manifest downloads by using the `--skip-manifest-update` option.
59
+
60
+
The `dotnet workload update` command also downloads advertising manifests. The downloads are required to learn if an update is available, so there is no option to prevent them from running. However, you can use the `--advertising-manifests-only` option to skip workload updates and only do the manifest downloads. This option is available starting in .NET 6 Preview 7.
38
61
39
62
## Arguments
40
63
41
-
-**`WORKLOAD_ID`**
64
+
-**`WORKLOAD_ID`...**
42
65
43
-
The workload ID of the workload to install. Use [dotnet workload search](dotnet-workload-search.md) to learn what workloads are available to install.
66
+
The workload ID or multiple IDs to install. Use [dotnet workload search](dotnet-workload-search.md) to learn what workloads are available.
@@ -35,6 +36,10 @@ For more information about the `dotnet workload` commands, see the [dotnet workl
35
36
36
37
<!-- markdownlint-disable MD012 -->
37
38
39
+
-**`--advertising-manifests-only`**
40
+
41
+
Downloads [advertising manifests](dotnet-workload-install.md#advertising-manifests) but doesn't update any workloads. Available starting in .NET 6 Preview 7.
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](../docs/core/tools/dotnet-workload-install.md#advertising-manifests).
0 commit comments