Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been practicing my C# lately on a new system. Compiling is fine, however when I try to run the generated .exe file, avast! thinks it is malware and runs it in the sandbox for a while (and it doesn't work in the sandbox as it should work normally), and only when it has finished scanning it will it let me run it normally.

When I try to run it again, most of the time the same process happens, whether I make changes to the code or not.

Is there any way I could play around with Avast's settings to stop it attacking my programs?

Note: I'm dealing with very simple, command prompt programs here.

share|improve this question

migrated from Feb 22 '13 at 18:11

This question came from our site for professional and enthusiast programmers.

have you tried setting an exclusion folder for your root code folder? – DiskJunky Feb 22 '13 at 17:34
I have never, ever dealt with a problem like this. Either your EXE is doing something strange, or you need to dump this Avast app. That said, looks like you're not the only person why may have encountered this. I found several related links using [this Google search](…. – Jonathan Wood Feb 22 '13 at 17:35
Weird. I run Avast and I'm a .NET developer for a living as well as doing a great deal of development at home in my spare time. I've never had Avast complain about one of my apps. – Pete Feb 22 '13 at 17:57
Disable Avast from scanning the directory where your .exe file is located. The fact your .exe is being blocked by Avast means your doing something nasty or odd enough Avast is flagging it. A normal program would not do this. – Ramhound Feb 22 '13 at 18:43
@Ramhound how would I do that? – Bluefire Feb 22 '13 at 19:05
up vote 9 down vote accepted

According to a user manual that I was able to find for version 4.8(see page 40), You need to do as the comments suggest and add your obj directory or bin directory to the exclusions list.

According to a post I found in the Avast forums from 2011 you can also add exclusions for single files by:

...manually edit[ing] the line where the path for the exception is. So, using the "browse" button, select first the folder, and then edit the resulting path and "add" to exclusions. You can also use "*" and "?".

share|improve this answer
Worked for me, thanks! – SeanKendle Dec 12 '14 at 22:21

You have to disable Avast DeepScreen:

Open Avast user interface>Settings>Antivirus uncheck, Enable DeepScreen.

enter image description here

It is now a much smaller option on the same page, (6th one down)

The option is harder to find (in my opinion) for the different version i have (version in the image).

enter image description here

share|improve this answer
This is the only thing that worked for me, exclusions didn't help. I'm very frustrated that I had to turn off part of my antivirus because it decided to forever block programs I use daily even after a clean scan. – Ben Nov 26 '13 at 4:52
This didn't work for me! Disabling DeepScreen had nothing but the same effects I was seeing before. – jj_ Apr 25 '15 at 4:43

As others have mentioned, the culprit is DeepScreen. It's especially bad if you have Avast set to Silent/gaming mode because then you can get unexpected/bizarre behavior and have no idea why. (I spent an entire day debugging the installer for a program I'm developing because it suddenly started running twice every single time I launched it--DeepScreen is very forgetful--and only succeeding on the the second run.)

Going under Settings, Update, Details, you can turn off popups for the majority of them--the annoying update-related popups, which should make it easier to work undisturbed, play video games, etc. But DeepScreen popups still pop up!

CANNOT DISABLE DEEPSCREEN: I've tried disabling DeepScreen entirely (under Settings, Antivirus), since it's so disruptive, but this checkbox appears to have no effect.

Unfortunately, the only way I currently have of disabling DeepScreen (in Avast 2014.9.0.2021) is to disable all shields! And I'm not even sure that this is working, since I sometimes get DeepScreen popups even with all shields disabled. Avast can't be prevented from starting with Windows during boot, so maybe uninstalling Avast is the only solution.

[Note: I'd appreciate upvotes if possible, so I can get enough rep to participate here at SU via comments. My rep from stackoverflow doesn't apply here, sadly. Those feeling extra generous could upvote 253935 too... :)]

share|improve this answer
didn't work for me, disabling DeepScreen changed nothing. – jj_ Apr 25 '15 at 4:44
It didn't work for me either (see "no effect" above), but temporarily disabling Avast (for testing purposes) usually did. If I were testing it today, though, I'd try the exclusion-list solution first, (see Pow-lan's answer). – Jon Coombs Apr 26 '15 at 7:02
Of course I had tried all exclusion lists before (both live monitoring and manual scan)... – jj_ Apr 27 '15 at 13:12

As you are using Avast double click on the Orange Avast Orb. Select Settings, and then select Antivirus. Scrolling down the Screen you will see Exclusions.

If you select Exclusions and the directory you are compiling to. you will be able to compile from any directory you exclude. Without any troubles.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .