Repository navigation
Description
Describe the bug
On a Linux machine that is not an Azure VM, every dotnet command under SDK 11.0.100 (GA) waits several seconds before exiting: dotnet --version takes 4.5 s and a no-op dotnet build takes 9.3 s. SDK 10.0.404 on the same machine takes 0.06 s and 0.7 s. The time is spent waiting on connections to the Azure VM metadata address 169.254.169.254:80, which never complete there.
This is the behaviour reported in #56928 and #56815, which were closed as fixed for 11.0.0 by #56863. It still happens on the GA SDK, and the wait is longer than in those reports.
Steps to reproduce
On a Linux machine where connections to 169.254.169.254 are silently dropped (curl -m 12 http://169.254.169.254/ times out), with telemetry at its default:
mkdir repro && cd repro
echo '{"sdk":{"version":"11.0.100","rollForward":"disable"}}' > global.json
dotnet new console -o app && cd app
dotnet build
time dotnet --version
time dotnet build
time dotnet msbuild -versionExpected behavior
The commands exit as soon as their work is done, as they do with SDK 10.0.404 or with DOTNET_CLI_TELEMETRY_OPTOUT=1.
Actual behavior
Wall time, three runs each, all within 0.2 s of the figure shown:
| Configuration | dotnet --version |
dotnet build (no-op) |
dotnet msbuild -version |
|---|---|---|---|
| SDK 10.0.404, default | 0.06 s | 0.7 s | 0.09 s |
| SDK 11.0.100, default | 4.55 s | 9.28 s | 9.2 s |
SDK 11.0.100, DOTNET_CLI_TELEMETRY_OPTOUT=1 |
0.01 s | 0.15 s | 0.08 s |
SDK 11.0.100, DOTNET_CLI_TELEMETRY_SHUTDOWN_TIMEOUT_MS=0 |
4.54 s | 9.28 s | not measured |
SDK 11.0.100, default, connections to 169.254.169.254 rejected with a TCP reset (iptables ... -j REJECT --reject-with tcp-reset) |
0.55 s | 1.27 s | 1.2 s |
The time is spent waiting, not computing: dotnet --version is real 4.559 user 0.051 sys 0.010, and MSBuild reports Time Elapsed 00:00:00.14 for the 9.28 s build.
strace -f -tt -e trace=connect,exit_group dotnet --version, times relative to the first connection:
- +0.00 s:
connectto the telemetry ingestion endpoint on port 443. - +0.55 s:
connectto::ffff:169.254.169.254port 80 returnsEINPROGRESSand never completes. - +2.56 s: a second
connectto::ffff:169.254.169.254port 80. - +4.56 s:
exit_group(0).
So the process makes two metadata attempts and waits 2 s on each. The same trace of dotnet build shows that sequence twice in a row (attempts at +0.6 s, +2.6 s, +5.2 s and +7.2 s, exit at +9.2 s), which accounts for the 9 s.
On an Azure-hosted machine (GitHub's ubuntu-latest runner), where the metadata address answers in 7 ms, the same SDK takes 0.15 s for dotnet --version and 0.57 s for the no-op build.
Is this a regression?
Yes. SDK 10.0.404 on the same machine is not affected.
Are there any workarounds?
DOTNET_CLI_TELEMETRY_OPTOUT=1 removes the wait.
dotnet --info output
.NET SDK:
Version: 11.0.100
Commit: 297acf930f
Workload version: 11.0.100-manifests.08e30c08
MSBuild version: 18.12.2-1.26529.118+297acf930
Runtime Environment:
OS Name: ubuntu
OS Version: 24.04
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/11.0.100
Host:
Version: 11.0.0
Architecture: x64
Commit: 297acf930f
Other details
- Ubuntu 24.04.5 LTS, x64, a hosted CI virtual machine outside Azure.
ip route get 169.254.169.254resolves through the default gateway; there is no link-local route. - No
OTEL_*,APPLICATIONINSIGHTS_*orDOTNET_CLI_TELEMETRY_*variables set except where the table says so.DOTNET_NOLOGO=1,DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1andDOTNET_MULTILEVEL_LOOKUP=0were set.
Could the metadata request be skipped, or not block process exit, in an 11.0.1xx servicing release?
Found while benchmarking build times for TUnit: thomhurst/TUnit#7707
Activity
github-actions commentedon Nov 10, 2026
🎯 Agentic Issue Triage
Triage Assessment:
medium- Telemetry is the likely area, but CODEOWNERS has no Area-Telemetry section, so routing uses the default team.Similar issues: #56928 (
duplicate)➡️ Summary: On SDK 11.0.100 GA, Linux hosts where 169.254.169.254 drops packets see dotnet commands stall 4.5–9 s at exit due to telemetry. Team should check whether the fix in #56863 is incomplete.
baronfel commentedon Nov 16, 2026
This is happening because the telemetry library we use to export to Azure is trying to dial out and there's a connection timeout that we don't have direct access to configure/change. We could potentially add some logic to mitigate that, but it's not a general issue with the CLI - it's a specific bug with reaching out to these endpoints in particular.
In the meantime, instead of (or in addition to) trying to prevent network access via firewall, please also set the CLI telemetry opt-out and you should sidestep all of these issues.
nagilson commentedon Nov 16, 2026
I still need to file the issue on the Azure Exporter - to be clear, I think they have a 2s timeout, it's just that they try to reach that ip address to determine if the machine is an azure VM and they always wait the full 2 seconds even if there is no connection to it.
On the other hand, in the long term we want to switch to a detached drain that doesn't require any waiting on the end here.
Install the .NET 11 SDK in CI again and build the .NET 11 test apps, …