How Antivirus Software Affects Rider's Performance (on Windows)

Problem description

Some antivirus software can interfere with the development cycle pipeline. When you start programs or build your project in Rider or via the command-line tool, many files are created on your computer. If your antivirus software has real-time scanning enabled, this can force the application processes to halt each time a file is created while the antivirus scans that file. This is a widespread problem affecting many Windows users:

You might be tempted to disable your antivirus altogether, but this is not recommended. To ensure your computer is safe from malicious software, you should not completely disable real-time scanning or your antivirus software. The approved way is to configure an antivirus exception list. It’s true that setting up this list manually can take a while. Luckily, if you use the default Windows security software, Windows Defender, Rider can automatically analyze your system and identify what should be added to its exception list.

Let Rider automatically configure the Windows Defender exception list

As the pre-installed Windows security software, Windows Defender is enabled by default on each Windows machine. Because Windows Defender is the most commonly used antivirus software, we’ve programmed Rider to be able to configure its exception list automatically.

Rider automatically checks whether you have real-time scanning enabled and whether the scanning is configured to process directories where Rider writes a lot of files. So, when you open your solution in Rider, you will see a notification in the bottom right-hand corner of the editor.

Screenshot_2019-10-06_at_23.13.33.png

Starting with v2019.2, Rider lets you exclude these directories from scanning automatically. To exclude the detected folders from being scanned by the antivirus, click "Fix...", then in the popup click the "Configure Automatically" button.

Screenshot_2019-10-06_at_23.14.05.png

Configure Windows Defender manually

If you prefer to perform the configuration manually, follow these steps:

  • Click the Windows Start button.
  • Enter “Windows Security”.
  • Click “Virus and threat protection”.
  • Click “Manage settings” under “Virus & threat protection settings”.
  • Scroll down if needed, and then click “Add or remove exclusions”.
  • For every folder shown in the notification and listed in "Folders and processes for an antivirus exception list," click the + button, select “Folder” from the menu, and select the folder.

Other antiviruses

If you’re using a different antivirus product, you may still be affected by the problem, but there is no possibility to detect or correct this automatically. If you’re experiencing poor performance, please follow the instructions of your antivirus product to exclude the directories and files listed in "Folders and Processes for an antivirus exception list" from real-time scanning.

Folders and processes for an antivirus exception list

Note: the path C:\Users\Username\ can be changed to the Windows environment variable %USERPROFILE%.

Folders

  • C:\Users\Username\.Rider2019.2\system 
  • Path to a solution folder (ex. C:\Users\Username\RiderProjects\WebApplication)

Processes

  • msbuild.exe
  • All .exe and .dll files in the following folders and their subfolders in the Rider installation directory (go to Help | Browse special files and folders and double-click Installation home directory)
    • bin\ 
    • lib\ReSharperHost
    • tools\
1 comment
Comment actions Permalink

Hi,

Thanks very much for the helpful article and automatic behaviour of detecting Windows Defender scanning, really appreciate the focus on not just Rider but the other parts of the system that create a better overall experience.

We're seeing warnings for %USERPROFILE%/.nuget. I see it's mentioned in your screenshots but not in the

Folders and processes for an antivirus exception list

section. Please could you confirm whether we should be excluding .nuget from Windows Defender and also whether you had any comments on the security tradeoffs in doing that, would you consider it to be unproblematic or would you say that comes with security risks.

Best wishes,

Calum

0

Please sign in to leave a comment.

Have more questions?

Submit a request