Reputation: 67
I've published a C# WPF app using ClickOnce. The app installs and runs without issue on the machine that I used to create the app. It also installs on other machines without any errors or log messages.
When I run the app by double-clicking the desktop shortcut or using the Start menu shortcut, ClickOnce will run (which I can see in Task Manager) and it will check for updates; but then nothing happens. The app window doesn't appear, the app doesn't show as running in Task Manager, and there are no error messages or logs.
I've tried it on 2 other computers with the same results on each. I'm installing the app from the deployed folder, accessed over our network. I've confirmed that the other computers have .NET 4.6.1 (the version targeted by the app) and I've put the 4.6.1 offline installer in the prerequisites folder, just for good measure. I've tried re-publishing, uninstalling, and reinstalling several times; I get the same results each time.
I've read through Microsoft's documentation and looked at multiple tutorials and can't find anything that I've missed. I'm hoping someone here can help or at least point me toward the best way to try and troubleshoot this.
- EDIT -
In response to the comment below by Lews Therin, I'm including the Event Viewer logs here. There are 2 error messages and an information log at the time stamp that I attempted to run the app again, so something is definitely going wrong with it.
I'll admit that I'm not very familiar with these types of logs; any assistance or direction on figuring out how to parse this information would be much appreciated.
Log #1 Windows Error Reporting: - System - Provider [ Name] Windows Error Reporting - EventID 1001 [ Qualifiers] 0 Level 4 Task 0 Keywords 0x80000000000000 - TimeCreated [ SystemTime] 2018-07-09T20:32:53.678375700Z EventRecordID 9118 Channel Application Computer NEWRE Security
EventData
1806639054918107500 5 CLR20r3 Not available 0 Order Management App v1.3.exe 1.0.0.0 5b43975e mscorlib 4.7.3110.0 5ae8c225 1189 6a System.Windows.Markup.XamlParse
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER62E8.tmp.mdmp \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER6971.tmp.WERInternalMetadata.xml \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER69EF.tmp.xml \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER69FD.tmp.csv \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER6A8A.tmp.txt C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_Order Management_062907d9d894cee17b7efa78a8149ec994ec4ef_257ae95b_2bbc7075
0 ba366769-6b13-439b-84f3-ee1229edf3d2 2147487744 3c8cd2034a7915dc691278a601bdc16c 0
Log #2 Application Error: - System - Provider [ Name] Application Error - EventID 1000 [ Qualifiers] 0 Level 2 Task 100 Keywords 0x80000000000000 - TimeCreated [ SystemTime] 2018-07-09T20:32:49.767127600Z EventRecordID 9117 Channel Application Computer NEWRE Security
EventData
Order Management App v1.3.exe 1.0.0.0 5b43975e KERNELBASE.dll 10.0.17134.112 c863c6f9 e0434352 0010db52 1820 01d417c3ff8df91d C:\Users\office\AppData\Local\Apps\2.0\45VVVJR0.JPP\WH8JZO50.YZT\orde..tion_246267fe9a4e6831_0001.0000_6fabe4376c3b347d\Order Management App v1.3.exe C:\WINDOWS\System32\KERNELBASE.dll ba366769-6b13-439b-84f3-ee1229edf3d2
Log #3 .NET Runtime: - System - Provider [ Name] .NET Runtime - EventID 1026 [ Qualifiers] 0 Level 2 Task 0 Keywords 0x80000000000000 - TimeCreated [ SystemTime] 2018-07-09T20:32:49.265695700Z EventRecordID 9116 Channel Application Computer NEWRE Security
EventData
Application: Order Management App v1.3.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.Runtime.InteropServices.COMException at System.RuntimeTypeHandle.CreateInstance(System.RuntimeType, Boolean, Boolean, Boolean ByRef, System.RuntimeMethodHandleInternal ByRef, Boolean ByRef) at System.RuntimeType.CreateInstanceSlow(Boolean, Boolean, Boolean, System.Threading.StackCrawlMark ByRef) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean, Boolean, Boolean, System.Threading.StackCrawlMark ByRef) at System.Activator.CreateInstance(System.Type, Boolean) at System.Activator.CreateInstance(System.Type) at Order_Management_App_v1._3.MainWindow..ctor() Exception Info: System.Windows.Markup.XamlParseException 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_0(System.Object) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) at System.Windows.Threading.ExceptionWrapper.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 MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(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 MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, 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 System.Windows.Threading.ExceptionWrapper.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 System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame) at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame) at System.Windows.Application.RunDispatcher(System.Object) at System.Windows.Application.RunInternal(System.Windows.Window) at System.Windows.Application.Run(System.Windows.Window) at Order_Management_App_v1._1.App.Main()
Upvotes: 1
Views: 926
Reputation: 67
After some research and a lot of help from folks in the comments, I've figured out what the issue was. The original problem happened because Interop.QBFC13 (the reference for the QuickBooks SDK library) can't be copied locally through Visual Studio. So, unless you manual add it to the references for your project (see the first answer in this question), the machine that your app will be run on will need to have the same version of the SDK installed on it. The download for QBFC13 (currently the most recent version) can be found here.
The later issues happened because I needed to undo an earlier fix (removing the StartupUri) that I had attempted and messed up.
Upvotes: 0
Reputation: 15
I did face this problem in my company also. In my company before I install any application on user computer they (IT Support) have to approve the application to install on their computer then only it will allow to run/open that application. You can also check the same with your IT Support is there any policy to install new application.
Upvotes: 0