Avira blocking main.exe problem

Hi relatively new to GO but a great enthousiast. I recently upgraded to v1.25 and using vscode for development. My big problem at the moment is that my windows Avira security software blocks everything when I do a “go run main.go” in vscode. I cant figure out how to configure in this security package on how to leave this specific situation alone. Problem is that go run builds something in a temporary generated directory and Avira quarantines it immediately. I am sure that this the problem because once I switch off realtime checking setting in Avira for 10 mins or so , everything works fine. I am sure I am not the first to run into this roadblock. Switching off Avira realtime checking makes me very uncomfortable and I did only by switching off internet access simultaneously but this only makes things a lot more unworkable of course .

Please help

Peter

Option1: Try use to code using WSL it is a Container Environment in Windows.

Option2: Go copiling the code in %TEMP% and Avira understand it is a strange action by a not assigned software. Change the default folder of Go editing Variables GOTMPDIR

set GOCACHE=C:\go-cache
set GOTMPDIR=C:\go-tmp

After add in Avira exception to ignore this folder.
C:\go-cache e C:\go-tmp

2 Likes

Thanks Antonio, want to give option 2 a try. Will supply an update on my findings . A question upfront I do have is : I understand the two directories for building but once that is done wont it try to copy the main.exe (or whatever) to my go project dir which is different on every project and will block the copying of the file ?

Peter