我正在使用WPF / Prism / C#开发应用程序。我正在使用Visual Studios 2015通过ClickOnce发布应用程序。应用程序在开发计算机上运行良好,但在安装到任何其他计算机上后都没有打开。
来自Dev Machine:
我可以在Visual Studios中打开应用程序。同样,已发布的ClickOnce版本安装并运行正常。
来自其他机器:
安装似乎成功,但此后将在启动时崩溃并立即关闭。发生这种情况时,我在Windows事件查看器中看到以下消息:
Application: FilePlayer.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Prism.Modularity.ModuleInitializeException
Stack:
at Prism.Modularity.ModuleInitializer.HandleModuleInitializationError(Prism.Modularity.ModuleInfo, System.String, System.Exception)
at Prism.Modularity.ModuleInitializer.Initialize(Prism.Modularity.ModuleInfo)
at Prism.Modularity.ModuleManager.LoadModulesThatAreReadyForLoad()
at Prism.Modularity.ModuleManager.LoadModuleTypes(System.Collections.Generic.IEnumerable`1<Prism.Modularity.ModuleInfo>)
at Prism.Modularity.ModuleManager.LoadModulesWhenAvailable()
at Prism.Modularity.ModuleManager.Run()
at Prism.Unity.UnityBootstrapper.InitializeModules()
at Prism.Unity.UnityBootstrapper.Run(Boolean)
at Prism.Bootstrapper.Run()
at FilePlayer.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)
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 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 System.Windows.Application.Run()
at FilePlayer.App.Main()
Log Name: Application
Source: .NET RunTime
Task Category: None
Level: Error
Event ID: 1026
是否有人可以就此问题的原因提供一些指导?另外,我如何尝试确定原因/解决此问题?
由于我不知道原因是什么,我将只提供项目的github:https://github.com/yousefm87/FilePlayer/ 如果您可以帮助缩小范围,我可以在项目中提供相关代码。