Hello, I'm a bit frustrated right now with this topic. I have finished a simple game made from scratch, but the following problems happened when preparing the release version:
When copying the .exe from the development directory to a new one where I was preparing the version, the .exe got detected as a Trojan by Windows Defender and deleted it. Had to manually allow it to avoid it getting deleted. I have Windows 10.
Tested it on my old laptop with Windows 8.1, the file was not detected as a virus. It showed a confirmation about unknown origin, but nothing else.
A friend of mine tested the game. Her antivirus instantly deleted the .exe after extracting it from the .zip, and just like in point 1, had to manually allow it to avoid it getting deleted.
What can I do to avoid this happening? I searched on the internet but to no avail. Some people even claimed that this happened with a simple Hello World. The only definitive solution seems to be to pay to sign your exe which is insane.
I also read suggestions to analyze it with VirusTotal which I did. Only 2 of 71 antivirus flagged it as malicious. Although Windows Defender was not in that 71.
I'm very frustrated because this is a simple game that I want to publish at Itch.io. With this false positives you are basically demanding a lot of extra trust on the game, which will put off any person looking to a play a casual game, but I can't find a way to solve this. My main questions are:
Is there any reliable way I can change my code to avoid this false positives? Couldn't find any guidelines about this. Also, can't think of any suspicious thing I do in the game. The only thing is that the game creates 2 new files to save user configuration and save data, but I don't see how to avoid that.
Is there any reliable way outside of modifying the code to avoid this?
Does this usually happen with any .exe file? I read cases happening with even a Hello World, but on the other hand in my previous work we made desktop applications with C++ and Qt and I never heard of problems with releases because of false positives.
Thank you for your time.