title: Cannot Run .NET C# Application Outside Debug Folder
body: <p>I'm having an odd issue with Visual Studio Community 2015. My program runs correctly inside the Visual Studio Editor, and it also runs correctly when the Application .exe is double clicked in the bin/debug/ directory. However, when the Application is run anywhere else on the computer (including the Release directory) the program does not run correctly. I am definitely copying all of the Debug folder to the location of attempted execution so it's not because of that.</p>
  
  <p>When I run the executable, a loading icon appears on the mouse, in Task Manager it appears as a process using about  &lt; 500K RAM and stays there until reboot. No window appears at all, and it is impossible to end the process once it has started, meaning it cannot be deleted.</p>
  
  <p>I'm using .NET 4.5.2 primarily however I've tried 4.5 and 4.6 and neither fixed the issue (I've checked and I have all 3 of them installed). I also tried copying the System DLLs locally and that didn't fix the issue either. I also tried creating a minimalist solution (below) containing a project that only printed "Hello World" and quit.</p>
  
  <pre><code>using System;
  
  namespace ConsoleApplication1
  {
      class Program
      {
          static void Main(string[] args)
          {
              Console.WriteLine("Hello World");
              Console.ReadLine();
          }
      }
  }
  </code></pre>
  
  <p>This program experienced the same issues except it couldn't even be run within the Debug folder, only within Visual Studio. I then changed the project so it opened, then closed again straight away without printing anything so that it didn't use the System libraries at all, and it did the same thing. I then tried running the program in both 64 and 32 bit forced, (on a 64 bit laptop) and that didn't make a difference either.</p>
  
  <p>I'm using Windows 7 Home Premium - Visual Studio Community 2015</p>
  
  <p>Thanks for any help :)</p>