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.
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.
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.
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%.
- C:\Users\Username\.Rider2019.2\system for Rider older than 2019.3 and %LOCALAPPDATA%\JetBrains\Rider2020.1 for Rider starting from 2020.1
- Path to a solution folder (ex. C:\Users\Username\RiderProjects\WebApplication)
- 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)
In case you are working on a Unity project, we recommend excluding a build folder from real-time scanning.