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: documentation/general/dotnet-run-file.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -289,16 +289,16 @@ The build is performed using MSBuild APIs on in-memory project files.
289
289
If an up-to-date check detects that inputs didn't change in subsequent `dotnet run file.cs` invocations,
290
290
building is skipped (as if `--no-build` option has been passed).
291
291
The up-to-date check is not 100% precise (e.g., files imported through an implicit build file are not considered).
292
-
It is possible to enforce a full build using `--no-cache` flag or `dotnet build file.cs`.
292
+
It is possible to enforce a full build using `--no-cache` flag or `dotnet build file.cs`
293
+
(for a more permanent opt-out, there is MSBuild property `FileBasedProgramCanSkipMSBuild=false`).
293
294
Environment variable [`DOTNET_CLI_CONTEXT_VERBOSE=true`][verbose-env] can be used to get more details about caching decisions made by `dotnet run file.cs`.
294
295
295
296
There are multiple optimization levels - skipping build altogether, running just the C# compiler, or running full MSBuild.
296
297
We always need to re-run MSBuild if implicit build files like `Directory.Build.props` change but
297
298
from `.cs` files, the only relevant MSBuild inputs are the `#:` directives,
298
299
hence we can first check the `.cs` file timestamps and for those that have changed, compare the sets of `#:` directives.
299
300
If only `.cs` files change, it is enough to invoke `csc.exe` (directly or via a build server)
300
-
re-using command-line arguments that the last MSBuild invocation passed to the compiler
301
-
(you can opt out of this via an MSBuild property `FileBasedProgramCanSkipMSBuild=false`).
301
+
re-using command-line arguments that the last MSBuild invocation passed to the compiler.
302
302
If no inputs change, it is enough to start the target executable without invoking the build at all.
- Note: this value is defaulted to `true` on non-Microsoft-provided builds of the .NET SDK (e.g. those provided by our Linux Distro partners, through Source Build, etc.)
27
28
28
-
29
29
### Related Environment Variables
30
30
31
31
-**`DOTNET_NOLOGO`**: Set to `true` to hide .NET welcome and telemetry messages on first run
@@ -40,7 +40,6 @@ The .NET SDK telemetry can be disabled using the following environment variable:
40
40
- For Microsoft official builds: Telemetry is **enabled by default** (opt-out model)
41
41
- For non-Microsoft builds: Telemetry is **disabled by default** (controlled by `MICROSOFT_ENABLE_TELEMETRY` compile flag)
42
42
43
-
44
43
-**Connection String**: Telemetry data is sent to Application Insights with instrumentation key: `74cc1c9e-3e6e-4d05-b3fc-dde9101d0254`
45
44
46
45
-**First Time Use**: Telemetry is only collected after the first-time-use notice has been shown and accepted (tracked via sentinel file)
@@ -51,8 +50,6 @@ The .NET SDK telemetry can be disabled using the following environment variable:
51
50
52
51
Every telemetry event automatically includes these common properties:
53
52
54
-
55
-
56
53
| Property | Description | Example Value |
57
54
|----------|-------------|---------------|
58
55
|**OS Version**| Operating system version |`Microsoft Windows 10.0.14393`|
@@ -64,6 +61,7 @@ Every telemetry event automatically includes these common properties:
64
61
|**Telemetry Profile**| Custom telemetry profile (if set via env var) | Custom value or null |
65
62
|**Docker Container**| Whether running in Docker container |`True` or `False`|
66
63
|**CI**| Whether running in CI environment |`True` or `False`|
64
+
|**LLM**| Detected LLM/assistant environment identifiers (comma-separated) |`claude` or `cursor`|
67
65
|**Current Path Hash**| SHA256 hash of current directory path | Hashed value |
68
66
|**Machine ID**| SHA256 hash of machine MAC address (or GUID if unavailable) | Hashed value |
69
67
|**Machine ID Old**| Legacy machine ID for compatibility | Hashed value |
@@ -80,29 +78,35 @@ Every telemetry event automatically includes these common properties:
80
78
### Core CLI Events
81
79
82
80
#### `command/finish`
81
+
83
82
**When fired**: At the end of every dotnet CLI command execution
84
83
85
84
**Properties**:
85
+
86
86
-`exitCode`: The exit code of the command
87
87
88
88
**Description**: Tracks the completion status of any dotnet command
89
89
90
90
---
91
91
92
92
#### `schema`
93
+
93
94
**When fired**: When CLI schema is generated or accessed
94
95
95
96
**Properties**:
97
+
96
98
-`command`: The command hierarchy as a string
97
99
98
100
**Description**: Tracks schema generation for the CLI
99
101
100
102
---
101
103
102
104
#### `toplevelparser/command`
105
+
103
106
**When fired**: For every top-level dotnet command
104
107
105
108
**Properties**:
109
+
106
110
-`verb`: Top-level command name (build, restore, publish, etc.)
107
111
108
112
**Measurements**: Performance data (startup time, parse time, etc.)
@@ -112,6 +116,7 @@ Every telemetry event automatically includes these common properties:
112
116
---
113
117
114
118
#### `sublevelparser/command`
119
+
115
120
**When fired**: For subcommands and specific command options
116
121
117
122
**Properties**: Various depending on command (verbosity, configuration, framework, etc.)
@@ -121,9 +126,11 @@ Every telemetry event automatically includes these common properties:
121
126
---
122
127
123
128
#### `commandresolution/commandresolved`
129
+
124
130
**When fired**: When a command is resolved through the command factory
125
131
126
132
**Properties**:
133
+
127
134
-`commandName`: SHA256 hash of command name
128
135
-`commandResolver`: Type of command resolver used
129
136
@@ -132,19 +139,23 @@ Every telemetry event automatically includes these common properties:
132
139
---
133
140
134
141
#### `install/reportsuccess`
142
+
135
143
**When fired**: When installation success is reported
136
144
137
145
**Properties**:
146
+
138
147
-`exeName`: Name of the install method that was used - one of `debianpackage`, a specific macOS `.pkg` file name, or a specific Windows exe installer file name.
See [MSBuild Telemetry Documentation](https://github.com/dotnet/msbuild/blob/main/documentation/wiki/CollectedTelemetry.md) for details on these events.
@@ -268,23 +293,26 @@ See [Container Telemetry Documentation](https://github.com/dotnet/sdk-container-
268
293
### `dotnet new` Command MSBuild Evaluation
269
294
270
295
#### `new/msbuild-eval`
296
+
271
297
**When fired**: When MSBuild project evaluation occurs during `dotnet new`
<value>You are running the 'tool install' operation with an 'HTTP' source: {0}. NuGet requires HTTPS sources. To use an HTTP source, you must explicitly set 'allowInsecureConnections' to true in your NuGet.Config file. Refer to https://aka.ms/nuget-https-everywhere for more information.</value>
0 commit comments