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.
In the Event Viewer, the exception is XamlParseException
.
- I am building this with VS 2013 Update 5
- The application targets .NET 4.5
- I have verified .NET 4.5 on other devices
Event Viewer caught this (I get v4.0.30319
on my device and all devices even though they have .NET 4.5+):
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.<.ctor>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)
I have tried the solutions here: .NET application cannot start and receive XamlParseException
I have tried commented out my starting code, in App.xaml.cs
the OnStartup()
override has base.OnStartup()
commented out and the only code is to pop-up a messagebox. The application still crashes.
I have verified to the best of my ability that all my dependencies exist in the output folder.
What could be causing this? What can I do to get more info on the exception? What code runs before OnStartup()
that I can try and wrap with a handler?