在Visual Studio中添加引用,添加后没有报错,但在调试时显示“系统找不到指定的文件”下面是错误的详情:System.Windows.Markup.XamlParseException HResult=0x80131501 Message=“对类型“Simple_Minecraft_Launcher.MainWindow”的构造函数执行符合指定的绑定约束的调用时引发了异常。”,行号为“8”,行位置为“13”。 Source=PresentationFramework StackTrace: at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) at System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc) at System.Windows.Application.LoadComponent(Uri resourceLocator, Boolean bSkipJournaledProperties) at System.Windows.Application.DoStartup() at System.Windows.Application.<.ctor>b__1_0(Object unused) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.DispatcherOperation.InvokeImpl() at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state) at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Threading.DispatcherOperation.Invoke() at System.Windows.Threading.Dispatcher.ProcessQueue() at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) at System.Windows.Application.RunDispatcher(Object ignore) at System.Windows.Application.RunInternal(Window window) at System.Windows.Application.Run(Window window) at System.Windows.Application.Run() at Simple_Minecraft_Launcher.App.Main() 内部异常 1: TypeInitializationException: “Simple_Minecraft_Launcher.MainWindow”的类型初始值设定项引发异常。 内部异常 2: FileNotFoundException: 未能加载文件或程序集“KMCCC.Pro, Version=0.9.5.7, Culture=neutral, PublicKeyToken=null”或它的某一个依赖项。系统找不到指定的文件。
尊敬的Microsoft产品和服务客户,您好!欢迎咨询,很荣幸有机会为您提供帮助。首先麻烦您按照下方的方案进行操作,执行“干净启动”,排除设备中第三方应用程序的干扰或冲突,然后查看问题是否依旧存在:1.卸载设备中全部的第三方反病毒软件与系统优化软件(例如360、腾讯电脑管家、鲁大师等)。2.按“Windows徽标键 R”,输入“msconfig”,回车启动系统配置页面。点击“服务”>“隐藏所有Microsoft服务”,点击“全部禁用”。3.鼠标右击任务栏,启动任务管理器。点击“启动”选项卡,将所有的启动项全部禁用。4.通过开始菜单重启设备(请选择重启设备,不要选择关机后再开机)。在干净启动的基础上再使用下方的四条命令对系统执行修复操作,看一下能否解决此问题:按“Windows徽标键 X”,启动“WindowsPowerShell(管理员)”,依次执行以下命令:Dism/Online/Cleanup-Image/ScanHealthDism/Online/Cleanup-Image/CheckHealthDISM/Online/Cleanup-image/RestoreHealthsfc/SCANNOW执行完毕后重启设备,查看问题是否解决。
您好,了解到您的问题,