我发布了一个WPF
应用。但是,当我在另一台计算机上安装并运行它时,桌面上没有任何显示。我尝试使用EventViewer
应用,然后探究一些错误(我也在我的计算机中尝试过,它工作正常,没有异常和错误):
enter image description here
Source(.Net运行时)有 错误:
Exception Info: System.IO.FileNotFoundException
at System.Reflection.RuntimeAssembly._nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean)
at System.Reflection.RuntimeAssembly.nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(System.Reflection.AssemblyName, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean)
at System.Reflection.RuntimeAssembly.InternalLoad(System.String, System.Security.Policy.Evidence, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean)
at System.Reflection.RuntimeAssembly.InternalLoad(System.String, System.Security.Policy.Evidence, System.Threading.StackCrawlMark ByRef, Boolean)
at System.Reflection.Assembly.Load(System.String)
at DevExpress.Utils.AssemblyHelper.GetAssembly(System.String)
at DevExpress.Xpf.Core.Theme.GetAssembly()
at DevExpress.Xpf.Core.Theme.get_Assembly()
at DevExpress.Xpf.Core.ThemedElementsDictionary.GetThemeAssembly(System.String)
at DevExpress.Xpf.Core.ThemedElementsDictionary.ForceThemeKeysLoading(System.String)
at DevExpress.Xpf.Core.ThemeManager.ChangeTheme(System.Windows.DependencyObject, System.String, Boolean, Boolean, System.String)
at DevExpress.Xpf.Core.ThemeManager.ThemeNamePropertyChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
at System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty, System.Object, System.Windows.PropertyMetadata, Boolean, Boolean, System.Windows.OperationType, Boolean)
at System.Windows.DependencyObject.SetCurrentValue(System.Windows.DependencyProperty, System.Object)
at DevExpress.Xpf.Core.ThemeManager.DevExpress.Xpf.Utils.Themes.IThemeManager.SetThemeName(System.Windows.DependencyObject, System.String)
at DevExpress.Xpf.Utils.Themes.GlobalThemeHelper.SetGlobalTheme(System.Windows.FrameworkElement)
at DevExpress.Xpf.Utils.Themes.GlobalThemeHelper.AssignApplicationThemeName(System.Windows.FrameworkElement)
at DevExpress.Xpf.Utils.Themes.GlobalThemeHelper.EnumerateSafe(System.Windows.WindowCollection, System.Action`1<System.Windows.Window>)
at DevExpress.Xpf.Utils.Themes.GlobalThemeHelper.SetApplicationWindows()
at DevExpress.Xpf.Utils.Themes.GlobalThemeHelper.SetWindowsApplicationThemeName()
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 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Thr
源应用程序有错误:
Faulting application name: WpfApplication5.exe, version: 1.0.0.0, time stamp: 0x5b491a6b
Faulting module name: KERNELBASE.dll, version: 10.0.16299.309, time stamp: 0xd3aa915c
Exception code: 0xe0434352
Fault offset: 0x001008f2
Faulting process id: 0x2ffc
Faulting application start time: 0x01d41bc5ee509362
Faulting application path: C:\Program Files (x86)\WPF5\WPF5\WpfApplication5.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
我继续用一台电脑。单击详细信息按钮时,我的应用"Has stopped working"
会显示一个对话框。它显示出发生了以下异常:mscorlib.dll
我浪费了一个星期来搜索信息以对其进行修复。但是我无法解决。感谢Good bro帮我!
答案 0 :(得分:0)
似乎代码上有一些绝对路径,即:“ C:/ Users / X / Desktop / ...” 尝试用相对路径更改绝对路径。