ESP8266 Arduino IDE and McAfee real time AV scanner

I have seen quite a few topics on this subject but non seem to have a resolution.

Issue ESP8266 Sketches will not compile/run when McAfee real time scanner is enabled.

Error: "The process cannot access the file because it is being used by another process."
"Error compiling for board WeMos D1 R2 & mini."

Does anyone know a resolution for this without disabling the McAfee real time scanner.

Glenn

zen:
I have seen quite a few topics on this subject but non seem to have a resolution.

Issue ESP8266 Sketches will not compile/run when McAfee real time scanner is enabled.

Error: "The process cannot access the file because it is being used by another process."
"Error compiling for board WeMos D1 R2 & mini."

Does anyone know a resolution for this without disabling the McAfee real time scanner.

Glenn

Disconnect your wifi then disable the anti-virus.

.

If you turn on verbose output during compilation (File > Preferences > Show verbose output during: > compilation (check)) then you can get an idea of which file is related to the problem and where that file is.

What I do in this situation is to modify my antivirus settings to whitelist the problematic file/folder/application/process. I remember someone recently saying that's no possible with McAffee antivirus but I don't use it so you might want to check and if there's no way to do this then consider using a more configurable antivirus program. Windows Defender allows you to do this so it's pretty sad if a reputable commercial software does not. It seems like there is such a strong trend lately of dumbing down user interfaces.

Many thanks Pert. I think it is that when the sketch is compiled the IDE generates temporary files. Because the file generation creates new files I can't white list the file beforehand and McAfee which I am loosing faith with only allows you to white list an existing file and not a directory/folder.

Thanks for taking the time to offer a possible solution.

Zen

I suffered from this problem when compiling for any board. For a long time, prior to re-building a sketch, I got into the habit of manually deleting the IDE session's temporary build folder that's located in the following folder:

users....\appdata\local\temp

This build folder is the one that's listed in the verbose output, saying that access is denied.
(This folder is deleted on exit from the IDE).

The problem with deleting this folder is that it increases the build time.

On some occasions, the manual delete would fail, indicating that McAfee had a file open in that folder.

Then the penny dropped, so now I temporarily turn off real-time scanning when using the Arduino IDE.

Save me loads of time when debugging, as the re-compiles are so much faster now.

@Derektw

Adding the Arduino locations to an antivirus EXCLUSIONS list is often the best way to deal with that issue.