0
votes

I was having an issues with a WPF application after deploying it from my local dev environment (where it works when running / debugging), it would crash, and never load the application (multiple different environments - Windows 7, Server 2008R2). The application crashes before starting up at all, so I started a brand new WPF test application (VS 2015, using .NET 4.0), and included a simple mainWindow.xaml with a simple DevExpress Grid (nothing special) and deployed it to one of the environments to test, and it has the same error.
I have made sure to include all DevExpress .dlls that are referenced in the project with the deployed code also.

It appears to have something to do with the following code implemented by DevExpress, since commenting it out will allow the application to work without the errors causing it to crash:

    private void OnAppStartup_UpdateThemeName(object sender, StartupEventArgs e)
    {
        // This was the issue causing the Error in EventViewer causing the application to Crash outside of the Dev Environemnt when deployed.
       DevExpress.Xpf.Core.ApplicationThemeHelper.UpdateApplicationThemeName();
    }

Although, I would still like to get an understanding of why it is doing that and how to fix it without just commenting it out.

Environment: Windows 10, Visual Studio 2015 Professional, DevExpress 16.1, WPF Application, .NET 4.0

Error [1] in Event Viewer: Faulting application name: TestWpfAppWithDevExpress.exe, version: 1.0.0.0, time stamp: 0x58497b5c Faulting module name: KERNELBASE.dll, version: 6.1.7601.23418, time stamp: 0x5708a89c Exception code: 0xe0434352 Fault offset: 0x000000000001a06d Faulting process id: 0x1648 Faulting application start time: 0x01d251676fb4af67 Faulting application path: C:\temp\testApp\TestWpfAppWithDevExpress.exe Faulting module path: C:\Windows\system32\KERNELBASE.dll

Error [2[ in event viewer: Application: TestWpfAppWithDevExpress.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.LoadBamlStreamWithSyncInfo(System.IO.Stream, System.Windows.Markup.ParserContext) at System.Windows.Application.LoadComponent(System.Uri, Boolean) at System.Windows.Application.DoStartup() 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.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) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(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.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr) at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef) at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef) at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame) at System.Windows.Application.RunInternal(System.Windows.Window) at System.Windows.Application.Run() at TestWpfAppWithDevExpress.App.Main()

1

1 Answers

0
votes

It looks like I was able to use the DevExpress toolbar and the DevExpress Assebmly Deployment tool to find out which Assemblies were required for the application that were tied to it. Once I did that and associated it with all the other / missing .dll files that were additionally required by the DevExpress items I was using (including the Theme I was using), it was able to be used on other machines.

enter image description here