title: WPF Application cannot start and receives an XAMLParseException
body: <p>I've written an application that runs fine on my development device and my Win 7/8/10 VM's but crashes on every single other computer (win 7/8/10) I have tried it on. When starting the application it's almost as if nothing happened.</p>
  <p>In the Event Viewer, the exception is <code>XamlParseException</code>.</p>
  <ul>
  <li>I am building this with VS 2013 Update 5</li>
  <li>The application targets .NET 4.5</li>
  <li>I have verified .NET 4.5 on other devices</li>
  </ul>
  <p>Event Viewer caught this (I get <code>v4.0.30319</code> on my device and all devices even though they have .NET 4.5+):</p>
  <pre class="lang-none prettyprint-override"><code>Application: HelpScoutMetrics.exe
  Framework Version: v4.0.30319
  Description: The process was terminated due to an unhandled exception.
  Exception Info: System.Windows.Markup.XamlParseException
  Stack:
     at System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)
     at System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)
     at System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)
     at System.Windows.Application.LoadComponent(System.Object, System.Uri)
     at HelpScoutMetrics.MainWindow.InitializeComponent()
     at HelpScoutMetrics.MainWindow..ctor()
     at HelpScoutMetrics.App.OnStartup(System.Windows.StartupEventArgs)
     at System.Windows.Application.&lt;.ctor&gt;b__1(System.Object)
     at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
     at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
     at System.Windows.Threading.DispatcherOperation.InvokeImpl()
     at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
     at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
     at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
     at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
     at System.Windows.Threading.DispatcherOperation.Invoke()
     at System.Windows.Threading.Dispatcher.ProcessQueue()
     at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
     at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
  </code></pre>
  <p>I have tried the solutions here: <a href="https://stackoverflow.com/questions/7802176/net-application-cannot-start-and-receive-xamlparseexception">.NET application cannot start and receive XamlParseException</a></p>
  <p>I have tried commented out my starting code, in <code>App.xaml.cs</code> the <code>OnStartup()</code> override has <code>base.OnStartup()</code> commented out and the only code is to pop-up a messagebox. The application still crashes.</p>
  <p>I have verified to the best of my ability that all my dependencies exist in the output folder.</p>
  <p>What could be causing this? What can I do to get more info on the exception? What code runs before <code>OnStartup()</code> that I can try and wrap with a handler?</p>