title: .NET 4.0 application throws exception on a machine without Visual Studio
body: <p>My application works great on all computers here that has Visual Studio installed, but it does not work on the machine that does not have Visual Studio.</p>
  
  <p>The application just crashes on start up with this message in the Event Viewer:</p>
  
  <pre><code>Framework Version: v4.0.30319
  Description: The process was terminated due to an unhandled exception.
  Exception Info: System.TypeInitializationException
  Stack:
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])
  at IssueTrackingSystem.My.MyApplication.Main(System.String[])
  </code></pre>
  
  <p>I tested a simple application with just one button, same results.</p>
  
  <p><img src="https://i.stack.imgur.com/1QnW5.png" alt="Error"></p>
  
  <p>UPDATE:</p>
  
  <p><img src="https://i.stack.imgur.com/s2uA1.png" alt="New error"></p>