Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Feb 22 '13 at 18:11

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

4  
have you tried setting an exclusion folder for your root code folder? –  DiskJunky Feb 22 '13 at 17:34
1  
This doesn't belong here and it's specific to Avast (which is a bad AV solution, but...). Either try at SuperUser or directly contact Avast support and ask them for a solution. You can probably exclude certain directories. –  walther Feb 22 '13 at 17:35
    
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](google.com/…. –  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

5 Answers 5

up vote 3 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

You have to disable Avast DeepScreen:

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

enter image description here

I did this before, weeks ago, and it worked. Now I cannot find the setting again. Maybe Avast updated. Any help?

share|improve this answer
1  
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

Personally I just disable it for the period I am coding, I would rather be undefended for a short while when coding than have a permanent blind spot. But that's just me. I am currently writing code to delve deeply into mshtml and I can understand why it finds that suspicious. Hobby code more than anything else. What's annoying is when I am working from home and work code gets flagged as suspicious, when works anti-v ignores it. Perhaps the age old adage of you get what you pay for comes into play here.

share|improve this answer

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.