Microsoft may be winning the hearts of developers with their open-sourcey behaviour, but their attitude towards privacy hasn’t changed at all. As if Windows 10 sending usage data to Microsoft wasn’t enough, the .NET Core toolchain does it too.
It’s called Telemetry, and the .NET Core documentation explains the extent of the data that is sent to Microsoft whenever you run a dotnet
subcommand.
The problem with .NET Core’s telemetry is not so much the nature of the data that is collected, but the fact that it is done by default, and you have to opt out if you don’t want it. That’s exactly the opposite of how it should be, with many people citing problems of privacy, security, and corporate buy-in in Issue #3093 on GitHub.
The fact that the issue is still open after nearly a year shows that the quest to “improve your experience” (whatever that means) and “provide a great product” is a lot more important than your privacy.
To disable telemetry, you have to add an environment variable called DOTNET_CLI_TELEMETRY_OPTOUT
and give it a value of 1
. (There are other valid values, such as “true”.) If you follow the instructions and set
it in cmd.exe
(Windows) or export
it in a Terminal window (Linux), as the official documentation suggests, that setting is only valid for the active command line window! Instead, follow the instructions below to set the environment variable permanently.
Opting Out Under Windows
Under Windows, go to Advanced System Settings (via Control Panel or directly from the Start menu) and add it to the environment variables from there.
Opting Out Under Linux
Under Linux, you can permanently set environment variables either by editing the script file for the shell you’re using (e.g. .bashrc
for Bash), or else adding an entry in /etc/environment
which will apply to all shells as well as non-shell windows:
echo "DOTNET_CLI_TELEMETRY_OPTOUT=1" | sudo tee -a /etc/environment
You will need to restart the system for this change to take effect.
Opting Out Under Mac
I don’t have a Mac, so all I can tell you is to get a decent OS. 😉
Seriously though, the same instructions for Linux should presumably work on a Mac.
Thanks for this helping article!