C# 在没有VS15的非Windows 10环境中WPF应用程序崩溃

C# 在没有VS15的非Windows 10环境中WPF应用程序崩溃,c#,.net,wpf,windows,visual-studio-2015,C#,.net,Wpf,Windows,Visual Studio 2015,我用Windows10和VS15Enterprise在计算机上编译WPF应用程序,运行良好。 当我在没有此配置(Win10+VS15)的任何其他计算机上运行它时,启动时会崩溃。 在Windows事件中,我发现以下异常信息: Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.ArgumentExcept

我用Windows10和VS15Enterprise在计算机上编译WPF应用程序,运行良好。 当我在没有此配置(Win10+VS15)的任何其他计算机上运行它时,启动时会崩溃。 在Windows事件中,我发现以下异常信息:

Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException
Stack:
at MS.Internal.Resources.ResourceManagerWrapper.GetStream(System.String)
at MS.Internal.AppModel.ResourcePart.EnsureResourceLocationSet()
at MS.Internal.AppModel.ResourcePart.GetContentTypeCore()
at System.IO.Packaging.PackagePart.get_ContentType()
at System.Windows.Application.LoadComponent(System.Uri, Boolean)
at System.Windows.Application.DoStartup()
at System.Windows.Application.<_ctor>b__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 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 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 TempMonitor.App.Main()
框架版本:v4.0.30319
描述:由于未处理的异常,进程已终止。
异常信息:System.ArgumentException
堆栈:
位于MS.Internal.Resources.ResourceManagerRapper.GetStream(System.String)
位于MS.Internal.AppModel.ResourcePart.ensureResourceLocation()处
位于MS.Internal.AppModel.ResourcePart.GetContentTypeCore()处
在System.IO.Packaging.PackagePart.get_ContentType()中
位于System.Windows.Application.LoadComponent(System.Uri,布尔值)
在System.Windows.Application.DoStartup()中
在System.Windows.Application.b__0(System.Object)上
位于System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate、System.Object、Int32)
位于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)
位于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)
位于System.Windows.Threading.ExceptionWrapper.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.Application.RunDispatcher(System.Object)
位于System.Windows.Application.RunInternal(System.Windows.Window)
在System.Windows.Application.Run(System.Windows.Window)中
在TempMonitor.App.Main()上
In发生在App.g.cs中的自动生成代码中,因此我无法调试它。我不明白为什么会发生这种错误。 有人有同样的问题吗

UPD:
发现错误:在AssemblyInfo.cs中,区域设置错误:-)

可能您试图运行应用程序的系统没有安装必要的.net framework。如果安装了,我将检查此问题。