I was in the middle of working on a project and I suddenly started getting the following error:
I tried a complete clean and rebuild. I even tried scorching my workspace but the error would not go away. I read that it might be a problem with Visual Studio extensions so I disabled all my extensions, but no luck.
I then started watching the obj\Debug folder as I did a build. Turns out that the .exe file was getting written, but then it would immediately be deleted before the build could finish. Then I found this:
It turns out that Avast anti-virus thought my program was suspicious and was quarantining it during the build process. Adding an exclusion for my entire source tree solved this issue.
Next time, I’ll discuss how to solve the issue when installing this same application.