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 assist you in configuring its exception list.
When you open a new solution, Rider shows a notification in the bottom right-hand corner of the editor to exclude Windows Defender certain directories from automated scanning.
To exclude the detected folders from being scanned by the antivirus, click "Automatically". To perform this action Rider may ask for Administrator privileges.
There is an Actions dropdown with two options: Ignore for this project and Never ask again. The first option disables this notification for the opened solution only (nothing is added to Windows Defender exclusions). The second option disables this notification for every solution opened in Rider (nothing is added to Windows Defender exclusions).
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\AppData\Local can be changed to the Windows environment variable %LOCALAPPDATA%.
- %LOCALAPPDATA%\JetBrains\Rider<version> (example %LOCALAPPDATA%\JetBrains\Rider2022.3)
- Path to a solution folder (ex. C:\Users\Username\RiderProjects\WebApplication)
- NuGet cache folder %USERPROFILE%\.nuget
Also we would recommend adding the following folders to the exclusions. These folders are not adding to the Antivirus exclusions automatically when you press a link in the notificatio.
- Rider installation folder (Help | Diagnostic Tools | Special Files and Folders and double-click Installation home directory)
- Rider backend binaries %PROGRAMFILES%\JetBrains\Rider\r2r (if exists, this folder can be already added to exclusions during the Rider installation process if you checked a corresponding option)
No processes are added automatically to the exclusion list. But you may add the following list to improve the performance of the IDE:
In case you are working on a Unity project, we recommend excluding a build folder from real-time scanning. This is the folder set in Unity build settings when pressing the Build button.