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 cause 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, as indicated by the following links:
Although disabling your antivirus software altogether may look like a good solution, it is not recommended. To ensure your computer is safe from malicious software, it is important to not completely disable real-time scanning or your antivirus software. Instead, you should configure an antivirus exception list. Setting up this list manually can be time-consuming, but if you use the default Windows security software, Windows Defender, Rider can automatically analyse 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. As Windows Defender is the most commonly used antivirus software. Rider has been programmed to assist in configuring its exception list.
When you open a new solution in Rider, a notification appears in the bottom right corner of the editor offering to exclude certain directories from from Windows Defender's automated scanning.
To exclude the detected folders from being scanned by the antivirus, click "Automatically". Note that Rider may ask for administrator privileges to perform this action.
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 and does not add anything to Windows Defender exclusions. The second option disables this notification for all solutions opened in Rider and does not add anything 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 necessary, and then click “Add or remove exclusions”.
- For each 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 use a different antivirus product, you may still experience this problem, but there is no automatic detection or correction available. If you experience poor performance, follow the instructions provided by 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 to be excluded from antivirus scan
Note: the path C:\Users\Username\AppData\Local can be replaced with the Windows environment variable %LOCALAPPDATA%.
When you click ‘Automatically’ in the notification, Rider adds the following directories to the list of exclusions:
- %LOCALAPPDATA%\JetBrains\Rider<version> (e.g. %LOCALAPPDATA%\JetBrains\Rider2022.3)
- Path to the solution folder (e.g. C:\Users\Username\RiderProjects\WebApplication)
- NuGet cache folder %USERPROFILE%\.nuget
We would also recommend excluding the following folders:
- 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 might be already added to exclusions during Rider's installation if you checked the corresponding option)
No processes are added automatically to the exclusion list. But you can add the following processes to improve the performance of the IDE:
For Unity Projects
We recommend excluding the build folder from real-time scanning. This folder is set in Unity build settings when pressing the Build button.