0

I'm attempting to publish a C# console application, and I'm following this advice. However, when I copy my Debug folder in my Visual Studio project directory and paste it to my desktop, the program no longer runs. Instead, it hangs and doesn't even execute the Console.WriteLine command on the first line. Here is my debug folder:

Debug folder

Any clues as to what might be the problem?

Community
  • 1
  • 1
Joel Christophel
  • 2,604
  • 4
  • 30
  • 49

1 Answers1

3

Do you have any anti-virus installed? I had this problem, and the root cause was that my anti-virus would always block any binary file which is being executed from a path which is not white-listed by my anti-virus (I'm using Avast). So, I had to white-list those directories where I would build my executable files. Since then, had no problem with executing the files.

shivisuper
  • 56
  • 1
  • 7
  • I can't believe it! I've had this problem before, and I completely forgot about it. Thanks for jogging my memory! I'm using avast as well Here a quick how-to on whitelisting: http://www.getavast.net/support/managing-exceptions – Joel Christophel May 15 '16 at 01:02