Author Topic: Visual Studio Builds Blocked  (Read 2001 times)

0 Members and 1 Guest are viewing this topic.

Offline some_yahoo

  • Newbie
  • *
  • Posts: 5
Visual Studio Builds Blocked
« on: February 03, 2021, 09:31:01 PM »
If my Visual Studio project has a Pre-Build event command line, Visual Studio creates a randomly named file something like:

c:\users\username\AppData\Local\Temp\tmp23a9ab8492d8c3f792387498798.exec.cmd

In my case this command file is trying to execute this command to capture the build date:

echo %date% %time% > "$(ProjectDir)\Resources\BuildDate.txt"

Which then triggers Avast to pop this error:
(BTW -1000pts for not having copy/paste on the error dialog, and -1000pts more for not allowing image posting in the forum)

APP NAME: the one I said
PROTECTED FOLDER: C:\USERS\USERNAME\Documents
File Path: c:\users\username\Documents\Projects\...\BuildDate.txt
Detected by: Ransomware Shield
Status: -

Since the cmd file is named at random every time, I have to turn the ransomware shield completely off to let it run, EVERY TIME I do a project build, so about 75 times a day.

Please work with Microsoft to let us whitelist with wildcard matches, or I will need to find another virus scanner provider.



Offline r@vast

  • Avast team
  • Massive Poster
  • *
  • Posts: 2761
Re: Visual Studio Builds Blocked
« Reply #1 on: February 05, 2021, 04:37:41 PM »
Hi,

You might want to consider disabling Ransomware Shield protection of the folder "Documents" or use a different path for your projects that are not under the Ransomware Shield protection.

Ransomware Shield protection is quite aggressive by design as it should be protecting folders with important files. If you are using some "version control system" for your development, then you might not need these folders protected by Ransomware Shield (as they are probably backed up automatically to a server).

https://support.avast.com/en-ww/article/Antivirus-Ransomware-Shield-FAQ/

Offline some_yahoo

  • Newbie
  • *
  • Posts: 5
Re: Visual Studio Builds Blocked
« Reply #2 on: April 12, 2021, 09:23:29 PM »
Hi,

You might want to consider disabling Ransomware Shield protection of the folder "Documents" or use a different path for your projects that are not under the Ransomware Shield protection.

Ransomware Shield protection is quite aggressive by design as it should be protecting folders with important files. If you are using some "version control system" for your development, then you might not need these folders protected by Ransomware Shield (as they are probably backed up automatically to a server).

https://support.avast.com/en-ww/article/Antivirus-Ransomware-Shield-FAQ/

Yeah that doesn't work:  The "tmp*.exec.cmd" file name is randomly generated and avast does not allow wildcards on the "Blocked and Allowed Apps" page.  And the "Exceptions" page - though it does allow wildcards, does not change anything about this warning.

The only thing I can do at this point is completely disable the ransomware shield.  Not recommended, I know.

UPDATE:  I was able to leave the ransomware shield on if I told it not to test "document" files.
« Last Edit: April 12, 2021, 09:29:04 PM by some_yahoo »