How to disable Perfwatson2.exe from Visual Studio

Visual StudioVisual Studio-2017

Visual Studio Problem Overview


How do I disable Perfwatson in Visual Studio? Perfwatson is not disabled by Tools > Extensions and Updates > Developer Analytics Tools.

Visual Studio Solutions


Solution 1 - Visual Studio

For Visual Studio 2022 and the latest version of Visual Studio 2019:

  1. From the help menu, select Privacy > Privacy Settings
  2. In the Visual Studio Experience Improvement Program dialog, select No, I would not like to participate.

Note: You can't opt out in pre-release versions by this mechanism.

For older version of Visual Studio

  1. From the help menu, select Send Feedback > Settings.
  2. In the Visual Studio Experience Improvement Program dialog, select No, I would not like to participate.

See Visual Studio Customer Experience Improvement Program for the official Microsoft instructions.

This change writes to the registry. See then next answer for fixing directly in the registry.

Solution 2 - Visual Studio

You can do it via the registry. For a 64 bit OS, the key is at

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VSCommon\15.0\SQM 

And for a 32 bit OS, at:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSCommon\15.0\SQM 

For Group Policy management (settings from IT department), it's

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\VisualStudio\SQM

The key name is OptIn (a DWORD), and you need to set it to 0 to disable.

Source: https://docs.microsoft.com/en-us/visualstudio/ide/visual-studio-experience-improvement-program

To set it automatically

(On a 64 bit OS machine not managed by a group policy), fire up an admin command prompt and just

REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VSCommon\15.0\SQM  /v OptIn /t REG_DWORD /d 0 /f

You may have to close and restart all visual studio related processes (or reboot) for the change to bite.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRickAndMSFTView Question on Stackoverflow
Solution 1 - Visual StudioRickAndMSFTView Answer on Stackoverflow
Solution 2 - Visual StudioJohan LundbergView Answer on Stackoverflow