Monogame 3.5 AVG Detection

I just installed the latest versions of Visual Studio 2015, and Monogame 3.5 on my home PC. (Windows 10).
I’ve setup the PC for developer mode as required by visual studio.
I can compile and run a Monogame Windows 10 UP test project without any issues.

However, when I try to build a new project (with no changes or added code) using the template for Monogame Windows Project, I get an error during the build:

Unable to copy file “obj\x86\Debug\MonogameWinProto.exe” to “bin\Windows\x86\Debug\MonogameWinProto.exe”. Access to the path ‘obj\x86\Debug\MonogameWinProto.exe’ is denied.

At the same time, AVG pops up with the following Threat Detection:
Threat: Trojan horse ILHeur.DPL
Object Name: [the name and location of the newly created debug executable.]

This occurs on both my Home PC and Laptop - both of which have AVG Installed.

I have run a full computer scan on my PC and found no Threats other than the executables created by the Build in Visual Studio.

I had the same problem too. I thought I’m the only one to have this problem. I really want to build game using Monogame and I can’t do that because of this issues :frowning :frowning: I hope someone can resolve this problem asap…

I don’t know if any anti-virus software is involved in my case, but from VS 2013 Ex, and worth with VS 2015 WD, sometimes, the process takes a while to dies and released its resources (especially lock on files) preventing VS compiler to create executable, sometimes, also it just display “build completed” when I ask it to run an instance, it is stubborn like hell and keep just building it (as it claims) but not running it.
Other times, VS 2015 cpu usage goes high for a few seconds but it “does” nothing (except using power for nothing, it may think I have asked for some extra heat), I mean it doesn’t report doing anything useful for me or my project.

I have never experienced such issues on VS 2010 Ex, NEVER ! Same computer, same AV software (Avast free). And the owner of the resource is always VS compiler. Using vhost process sometimes helps, sometimes not.

On windows >= 7, I guess, you can use resources monitor, in disk tab, to shows files locked by which process.

AVG is reporting a false positive in code that you built. There’s nothing that we can do about that. All you can do is try to setup AVG to ignore those files you built.

I’ll build a default project and submit it to AVG as a false detection. What’s unfortunate is that it’s literally a blank project. I’ve created the project - made no changes - and built.

Consider adding your compile directories to the Exceptions List of your antivirus programs.

Me too I just posted something about this yesterday >.>

I have the same problem. I called AVG support and the tech support guy and I worked through the problem to come up with the following solution.

  1. Open AVG and select Options->Advanced Settings.
  2. From this menu select Exceptions. Add 2 exceptions:
    C:\Program Files (x86)\MSBuild\MonoGame\v3.0\Tools\MGCB.exe
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe.

This fixed the problem for about a month with several new projects and then today, all of a sudden when I created a new project, it started happening again. I can turn AVG off to do a build but that is not acceptable. I wish AVG would just fix the problem. It’s a false positive and in my opinion they fix the problem and shouldn’t be generating the error.

I wish I had a foolproof answer for you but until AVG addresses the problem I’m afraid it’s not a reliable solution.