Windows 为什么我的应用程序在另一台PC上启动时崩溃?

Windows 为什么我的应用程序在另一台PC上启动时崩溃?,windows,crash,dependencies,windows-10,windows-server-2008-r2,Windows,Crash,Dependencies,Windows 10,Windows Server 2008 R2,在我的开发盒(Windows10Pro x64V1607)上,我构建了一个运行良好的.NET应用程序(VS Premium 2013 Update 5,Framework 4.5.1,平台目标:任何CPU)。(与可执行文件位于同一目录中的Microsoft.Expression.Interactions.dll(v3.0.40218.0)和Ninject.dll(v3.2.2.0)存在dll依赖项。) 但是,我要在Windows Server 2008 R2 Std x64 SP1(终端服务器模

在我的开发盒(Windows10Pro x64V1607)上,我构建了一个运行良好的.NET应用程序(VS Premium 2013 Update 5,Framework 4.5.1,平台目标:任何CPU)。(与可执行文件位于同一目录中的
Microsoft.Expression.Interactions.dll
(v3.0.40218.0)和
Ninject.dll
(v3.2.2.0)存在dll依赖项。)

但是,我要在Windows Server 2008 R2 Std x64 SP1(终端服务器模式,本地管理权限)上运行该应用程序,它在启动时崩溃(在同一目录中有.exe和更高版本的.dll)。Server 2008框中未安装.NET Framework 4.5.2(由确定)。我得到以下问题签名:

Problem signature:
  Problem Event Name:   CLR20r3
  Problem Signature 01: MyApp.exe
  Problem Signature 02: 2.0.0.0
  Problem Signature 03: 588b6952
  Problem Signature 04: mscorlib
  Problem Signature 05: 4.0.30319.36373
  Problem Signature 06: 583fd726
  Problem Signature 07: 27cf
  Problem Signature 08: 0
  Problem Signature 09: System.Windows.Markup.XamlParse
  OS Version:   6.1.7601.2.1.0.16.7
  Locale ID:    1033
  Additional Information 1: 0a9e
  Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
  Additional Information 3: 0a9e
  Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
此外,在Windows日志/应用程序中,我还遇到以下.NET运行时错误:

Application: MyApp.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.LoadComponent(System.Object, System.Uri)
   at MyApp.MainWindow.InitializeComponent()
   at MyApp.MainWindow..ctor(MyApp.MainWindowVM)
   at DynamicClass.DynamicInjector73c5fe57e70845ecaa6b82291e882454(System.Object[])
   at Ninject.Activation.Providers.StandardProvider.Create(Ninject.Activation.IContext)
   at Ninject.Activation.Context.ResolveInternal(System.Object)
   at Ninject.Activation.Context.Resolve()
   at Ninject.KernelBase+<>c__DisplayClass15.<Resolve>b__f(Ninject.Planning.Bindings.IBinding)
   at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at System.Linq.Enumerable+<CastIterator>d__b1`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at System.Linq.Enumerable.Single[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at Ninject.ResolutionExtensions.Get[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](Ninject.Syntax.IResolutionRoot, Ninject.Parameters.IParameter[])
   at MyApp.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.Threading.Dispatcher.Run()
   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 MyApp.App.Main()
应用程序:MyApp.exe
框架版本:v4.0.30319
描述:由于未处理的异常,进程已终止。
异常信息:System.Windows.Markup.XamlParseException
堆栈:
在System.Windows.Markup.wpfxamloader.Load(System.Xaml.XamlReader、System.Xaml.IXamlObjectWriterFactory、Boolean、System.Object、System.Xaml.XamlObjectWriterSettings、System.Uri)
位于System.Windows.Markup.wpfxamloader.LoadBaml(System.Xaml.XamlReader,Boolean,System.Object,System.Xaml.Permissions.XamlAccessLevel,System.Uri)
位于System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream、System.Windows.Markup.ParserContext、System.Object、Boolean)
位于System.Windows.Application.LoadComponent(System.Object,System.Uri)
在MyApp.MainWindow.InitializeComponent()中
在MyApp.MainWindow..ctor(MyApp.MainWindowVM)上
在DynamicClass.DynamicInputor73C5FE57E70845ECAA6B82291E882454(System.Object[])上
位于Ninject.Activation.Providers.StandardProvider.Create(Ninject.Activation.IContext)
位于Ninject.Activation.Context.ResolveInternal(System.Object)
在Ninject.Activation.Context.Resolve()处
在Ninject.KernelBase+c__显示class15.b___f(Ninject.Planning.Bindings.IBinding)
在System.Linq.Enumerable+中选择Enumerableiterator`2[[System.\u Canon,mscorlib,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089],[System.\u Canon,mscorlib,Version=4.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089]。MoveNext()
在System.Linq.Enumerable+d_uuuB1`1[[System.uuu Canon,mscorlib,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089]。MoveNext()
在System.Linq.Enumerable.Single[[System.Collections.Generic.IEnumerable`1]
在Ninject.ResolutionExtensions.Get[[System.\uu Canon,mscorlib,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089]](Ninject.Syntax.IResolutionRoot,Ninject.Parameters.ipParameter[])
在MyApp.App.OnStartup(System.Windows.StartupEventArgs)上
在System.Windows.Application.b__1(System.Object)中
位于System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate、System.Object、Int32)
位于MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object、System.Delegate、System.Object、Int32、System.Delegate)
在System.Windows.Threading.DispatcherOperation.InvokeImpl()中
位于System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
位于System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext,System.Threading.ContextCallback,System.Object,布尔值)
在System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext,System.Threading.ContextCallback,System.Object,布尔值)
在System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext,System.Threading.ContextCallback,System.Object)上运行
在System.Windows.Threading.DispatcherOperation.Invoke()中
在System.Windows.Threading.Dispatcher.ProcessQueue()中
位于System.Windows.Threading.Dispatcher.WndProcHook(IntPtr、Int32、IntPtr、IntPtr、Boolean ByRef)
位于MS.Win32.hwndwapper.WndProc(IntPtr、Int32、IntPtr、IntPtr、Boolean ByRef)
位于MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
位于System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate、System.Object、Int32)
位于MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object、System.Delegate、System.Object、Int32、System.Delegate)
位于System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority,System.TimeSpan,System.Delegate,System.Object,Int32)
在MS.Win32.HwndSubclass.SubclassWndProc(IntPtr,Int32,IntPtr,IntPtr)
位于MS.Win32.unsafentivemethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
位于System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
位于System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
在System.Windows.Threading.Dispatcher.Run()中
位于System.Windows.Application.RunDispatcher(System.Object)
位于System.Windows.Application.RunInternal(System.Windows.Window)
在System.Windows.Application.Run(System.Windows.Window)中
在System.Windows.Application.Run()处
在MyApp.App.Main()中

我丢失了一些dll吗?错误的dll版本?感谢您的指点。

找到了丢失的dll:
系统.Windows.Interactivity.dll
,位于我的W10电脑上的
C:\Windows\Microsoft.NET\assembly\GAC\u MSIL\System.Windows.Interactivity\v4.0\u 4.5.0.0\u 31bf3856ad364e35
。远程调试发现了这个恶棍

使用远程调试器逐步调试代码,直到看到它在哪里崩溃
System.Windows.Markup.wpfxamloader.Load
是用户登录。单步执行代码很有帮助,因为当抛出未处理的异常时,您可以看到变量内容或当前执行状态。@IInspectable是的,我对定义搞错了。谢谢你的更正。好的,这很有帮助。所以下次不要抱怨,做远程调试;)