-4

When I run a GO program, temporary files are detected as a threat by Windows Defender. Example:AppData\Local\Temp\go-link-4058383063\a.out

I have changed GOTMPDIR env var and I disabled security on this specific folder. go-buildxxx files are now in the right place.

But go-linkxxx files are still in AppData\Local\Temp\ and still trigger Windows Defender.

How to change go-linkxxx locations ? Any solution to not trigger windows defender is welcome.

2
  • 1
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Commented Sep 18 at 21:22
  • 1
    For shame, I don't understand why this question is being downvoted, this is a legitimate issue. Most Go developers at my organization are seeing this behavior for the past few months. Had to move all my Go work to WSL to keep development going, then eventually cross-compile to Windows. Commented Oct 19 at 13:33

1 Answer 1

-1

Setup your TEMP/TMP envs inside a custom folder and exclude that folder inside windows defender settings

Sign up to request clarification or add additional context in comments.

3 Comments

I've already mentioned that in my post.
sorry my bad. you can use a WSL or a docker container . although this is a temporary solution, it can solve your problem and works like a charm
Yes I am working with WSL for the moment. This is not the solution I could expect but I recommend.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.