ClickOnce WPF应用程序未在其他计算机上运行

时间:2018-07-09 19:16:34

标签: .net wpf visual-studio-2017 clickonce publishing

我已经使用ClickOnce发布了C#WPF应用。该应用程序在我用来创建该应用程序的计算机上安装并运行时没有问题。它还可以安装在其他计算机上,而不会出现任何错误或日志消息。

当我通过双击桌面快捷方式或使用“开始”菜单快捷方式运行该应用程序时,ClickOnce将运行(我可以在任务管理器中看到)并检查更新;但是什么也没发生。该应用程序窗口未出现,该应用程序未在任务管理器中显示为正在运行,并且没有错误消息或日志。

我已经在另外两台计算机上尝试过,每台计算机上的结果相同。我正在从可通过我们的网络访问的已部署文件夹中安装应用程序。我已经确认其他计算机都具有.NET 4.6.1(应用程序针对的版本),并且已经将4.6.1脱机安装程序放置在prerequisites文件夹中,这只是出于很好的考虑。我尝试过多次发布,卸载和重新安装;我每次都得到相同的结果。

我已经阅读了Microsoft的文档,看过多个教程,找不到我错过的任何内容。我希望这里的人可以帮助或至少将我引向尝试解决此问题的最佳方法。

-编辑-

为响应Lews Therin在下面的评论,我在此处包括“事件查看器”日志。我尝试再次运行该应用程序时,有2条错误消息和一条信息日志,因此肯定有问题。

我承认我对这些类型的日志不是很熟悉;我们非常感谢您提供任何有关如何解析此信息的帮助或指导。

日志#1 Windows错误报告: -系统   -提供者    [名称] Windows错误报告   -事件ID 1001    [预选赛] 0    4级    任务0    关键字0x80000000000000   -创建时间    [SystemTime] 2018-07-09T20:32:53.678375700Z    EventRecordID 9118    渠道申请    电脑NEWRE    安全性

  • EventData

    1806639054918107500 5 CLR20r3 无法使用 0 订单管理应用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

日志#2 应用程序错误: -系统   -提供者    [名称]申请错误   -EventID 1000    [预选赛] 0    2级    任务100    关键字0x80000000000000   -创建时间    [SystemTime] 2018-07-09T20:32:49.767127600Z    EventRecordID 9117    渠道申请    电脑NEWRE    安全性

  • EventData

    订单管理应用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

日志#3 .NET运行时: -系统   -提供者    [名称] .NET运行时   -事件ID 1026    [预选赛] 0    2级    任务0    关键字0x80000000000000   -创建时间    [SystemTime] 2018-07-09T20:32:49.265695700Z    EventRecordID 9116    渠道申请    电脑NEWRE    安全性

  • EventData

    应用程序:订单管理应用程序v1.3.exe框架版本:v4.0.30319说明:由于未处理的异常,该进程已终止。异常信息:System.RuntimeTypeHandle.CreateInstance处的System.Runtime.InteropServices.COMException(System.RuntimeType.CreateInstanceSlow(布尔值,布尔值,布尔值,系统)处的System.RuntimeType,布尔值,布尔值,布尔值ByRef,System.RuntimeMethodHandleInternal ByRef,布尔值ByRef) System.RuntimeType.CreateInstanceDefaultCtor(Boolean,Boolean,Boolean,System.Threading.StackCrawlMark ByRef)的System.Activator.CreateInstance(System.Type,Boolean)的System.Activator.CreateInstance(System.Type)的.Threading.StackCrawlMark ByRef)在Order_Management_App_v1._3.MainWindow..ctor()处异常信息:System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader,System.Xaml.IXamlObjectWriterFactory,Boolean,System.Object, System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader,Boolean,System.Object,System.Xaml.Permissions.XamlAccessLevel,System.Uri)处的System.Xaml.XamlObjectWriterSettings,System.Uri)标记X系统处的amlReader.LoadBaml(System.IO.Stream,System.Windows.Markup.ParserContext,System.Object,Boolean)在系统处的System.Windows.Application.LoadBamlStreamWithSyncInfo(System.IO.Stream,System.Windows.Markup.ParserContext)。 Windows.Application.LoadComponent(System.Uri,Boolean)在System.Windows.Application.DoStartup()在System.Windows.Application。<。ctor> b__1_0(System.Object)在System.Windows.Threading.ExceptionWrapper.InternalRealCall( System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object,System.Delegate,System.Object,Int32,System.Delegate)在System.Windows.Threading.DispatcherOperation.InvokeImpl( ),位于System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object),位于MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object),位于System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext,System.Threading.ContextCallback, System.Object,布尔值),位于System.Threading.Exec MS处的utionContext.Run(System.Threading.ExecutionContext,System.Threading.ContextCallback,System.Object,布尔值)在MS.System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext,System.Threading.ContextCallback,System.Object)内部System.Windows.Threading.DispatcherOperation.Invoke()处的Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext,System.Threading.ContextCallback,System.Object)在System.Windows处的System.Windows.Threading.Dispatcher.ProcessQueue() MS.Win32中的.Threading.Dispatcher.WndProcHook(IntPtr,Int32,IntPtr,IntPtr,布尔ByRef)(MS.Win32.HwndBackObject。 )在System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object,System.Delegate,System.Object,Int32,System.Delegate)处的System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate,System.Object,Int32) )在System.Windows.Threading.Disp atcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority,System.TimeSpan,System.Delegate,System.Object,Int32),位于MS.Win32.HwndSubclass.SubclassWndProc(IntPtr,Int32,IntPtr,IntPtr),位于MS.Win32.UnsafeNativeMethods。位于System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)位于System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)处的DispatchMessage(System.Windows.Interop.MSG ByRef) System.Windows.Application.RunInternal(System.Windows.Window)(位于System.Windows.Application.Run(System.Windows.Window))(位于Order_Management_App_v1._1.App.Main)中的System.Windows.Application.RunDispatcher(System.Object) ()

2 个答案:

答案 0 :(得分:0)

我也确实在公司中遇到了这个问题。在我公司中,在用户计算机上安装任何应用程序之前,他们(IT支持)必须批准该应用程序才能在其计算机上安装,然后只有它允许运行/打开该应用程序。您也可以与IT支持人员确认是否有任何安装新应用程序的政策。

答案 1 :(得分:0)

经过一些研究,并在评论中得到了很多人的帮助,我才知道问题出在哪里。发生最初的问题是因为无法通过Visual Studio在本地复制Interop.QBFC13(QuickBooks SDK库的引用)。因此,除非您手动将其添加到项目的引用中(请参阅this question中的第一个答案),否则将在其上运行您的应用程序的计算机上必须安装相同版本的SDK。可以在here上找到QBFC13的下载文件(当前最新版本)。

发生后来的问题是因为我需要撤消先前尝试并弄乱的早期修复程序(删除StartupUri)。

相关问题