title: c# .NET application crashes on startup on 1 of 3 machines with System.IO.FileNotFoundException
body: <p>I am writing an application in C# with Visual Studio 2010 and am close to the end with engineering of my application. For testing i use 3 different machines:</p>
  
  <p>Machine A: <code>Workstation-PC (Intel CPU, Win 7 64Bit, .NET 4.0)</code></p>
  
  <p>Machine B: <code>Private PC (Intel CPU, Win7 64Bit, .NET 4.0)</code></p>
  
  <p>Machine C: <code>Labor-PC (AMD64, Win7 64Bit, .NET 4.0)</code></p>
  
  <p>I want a standalone .exe file for the final version. The application works like a charm on Machines A and B no matter if i run the application in the solution folder or copy it to any directory and run it there. It works always (as it should). But Machine C throws an error, directly on application startup and outputs a "<i>...<code>WERInternalMetadata.xml</code></i>"-file which says "<i><code>System.IO.FileNotFoundException</code></i>":</p>
  
  <p><code>CLR20r3
  myapp.exe
  1.0.0.0
  53318d78
  Testreporter
  1.0.0.0
  53318d78
  5d
  f
  System.IO.FileNotFoundException</code></p>
  
  <p>But when I start the application in the solution folder(e.g. ...myapp\bin\x64\Debug), where the *.dll files are contained, the application works perfectly without any problems.
  Does this mean, that the program searches for its dependecies in the root directory?</p>
  
  <p>I've already checked the references in code. Furthermore if there were any problems with references, the app would not run on Machine B...</p>
  
  <p>I find it curious that Machines A and B run the program without issues no matter where i place the .exe but Machine C only runs my app properly when placed in specific path....</p>
  
  <p>Maybe the processor plays a role there? Any ideas on how to solve this?</p>
  
  <p>BTW:
  How can i build a .exe-file that already contains all dependencies and libraries my application needs. A standalone-exe so to say...</p>
  
  <p>Thank you very much</p>