jgauffin
jgauffin

Reputation: 101150

How to increase Visual Studio performance by disabling antivirus in certain folders

Can I increase Visual Studio performance by disabling my antivirus in some folders? If so, which folders should I prevent it from scanning?

Upvotes: 3

Views: 2545

Answers (2)

katrash
katrash

Reputation: 1165

You can exclude the VS apps from being scanned in real-time by Windows Defender using the following commands (to be run as an administrator):

powershell.exe add-mppreference -ExclusionProcess devenv.exe
powershell.exe add-mppreference -ExclusionProcess msvsmon.exe
powershell.exe add-mppreference -ExclusionProcess vsdebugconsole.exe

Note: use add-mppreference to append to the list as set-mppreference will overwrite your existing list.

Upvotes: 1

OSH
OSH

Reputation: 2937

You can improve performance by disabling the real-time-protection on your output directories. Running with an active antivirus means that each time you start running / debugging your output programs they are scanned by the AV (this slows their start up time by ~15% ). You will see an improvements if you disable the AV for the project output directory (where it places the EXE's, Dll's).

Also, if you run visual studio itself without an AV it may work a little faster (I don't think the difference will be noticeable). Data files (such as .sdf, .obj, etc.) are usually not scanned by the real time protection under the default settings. This depends on the antivirus you are using, and the settings.

Upvotes: 2

Related Questions