Visual Studio 2017 加载时崩溃的解决方案 [英] Visual Studio 2017 crashing on load solution

查看:72
本文介绍了Visual Studio 2017 加载时崩溃的解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 VS 2017 不断崩溃,并在 EventViewer 中出现以下错误.知道它为什么会崩溃吗?

My VS 2017 keeps crashing with following error in EventViewer. Any idea why it's crashing?

Exception Info: System.InvalidOperationException
   at System.Linq.Enumerable.Single[[System.Byte, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<Byte>)
   at System.Linq.ImmutableArrayExtensions.SingleOrDefault[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Immutable.ImmutableArray`1<System.__Canon>, System.Func`2<System.__Canon,Boolean>)
   at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioProjectTracker.GetOrCreateProjectFromArgumentsAndReferences(Microsoft.VisualStudio.LanguageServices.ProjectSystem.IWorkspaceProjectContextFactory, System.String, System.Collections.Generic.IReadOnlyDictionary`2<System.String,Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.DeferredProjectInformation>, System.Collections.Generic.IReadOnlyDictionary`2<System.String,System.String>)
   at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioProjectTracker.GetOrCreateProjectFromArgumentsAndReferences(Microsoft.VisualStudio.LanguageServices.ProjectSystem.IWorkspaceProjectContextFactory, System.String, System.Collections.Generic.IReadOnlyDictionary`2<System.String,Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.DeferredProjectInformation>, System.Collections.Generic.IReadOnlyDictionary`2<System.String,System.String>)
   at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioProjectTracker+<PopulateWorkspaceFromDeferredProjectInfoAsync>d__86.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioProjectTracker+<LoadSolutionFromMSBuildAsync>d__79.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at Roslyn.Utilities.TaskExtensions+<FireAndForget>d__0.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0(System.Object)
   at Microsoft.VisualStudio.Threading.JoinableTaskFactory+SingleExecuteProtector.TryExecute()
   at Microsoft.VisualStudio.Threading.JoinableTaskFactory+SingleExecuteProtector+<>c.<.cctor>b__20_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 MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(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 MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, 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)

推荐答案

要解决此问题:尝试删除位于解决方案文件旁边的 .vs 文件夹(默认情况下是隐藏的).这将使 VS 忘记该解决方案的任何 IDE 设置,例如打开的文件或断点位置.如果您不想丢失这些,请移动/重命名目录.

To work around the issue: Try deleting the .vs folder (which is hidden by default) that resides next to your solution file. This will make VS forget about any IDE settings for that solution, such as files opened or breakpoint locations. If you don't want to lose those, move/rename the directory instead.

提供反馈并帮助改进产品:在应用解决方法之前,请尝试捕获问题的故障转储.然后,使用 VS 中的报告崩溃"功能或通过在 http://connect.microsoft.com/visualstudio.

To give feedback and help make the product better: Before applying the workaround, try to capture a crash dump for the issue. Then, report it using the Report A Crash feature in VS or by filing an issue on http://connect.microsoft.com/visualstudio.

这篇关于Visual Studio 2017 加载时崩溃的解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆