Visual Studio 2012已停止为某些项目工作

时间:2016-08-12 17:55:19

标签: c# visual-studio visual-studio-2012

突然(可能在VS运行后重新启动我的电脑)Visual Studio 2012无法打开以前工作的很多项目。
它也无法创建新项目。

错误非常普遍且通用:
visual studio has stopped working

我尝试了像one这样的问题的所有解决方案。我也重新安装了VS 2012,但仍然没有成功。

我发现的模式是它无法创建一些项目类型,但其他工作正常。

这些工作正常:

  • Windows窗体应用
  • 活动图书馆
  • ASP.NET MVC 3(空)
  • ASP.NET MVC 4(空)

这些失败:

  • WPF App
  • 控制台应用
  • ASP.NET Web窗体应用
  • 班级图书馆
  • 便携式班级图书馆
  • ASP.NET MVC 3(Internet应用程序)
  • ASP.NET MVC 4(Web API)
  • WCF服务应用

此外,更改框架版本没有任何区别。

知道可能是什么问题吗?

编辑事件日志正在显示

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Globalization.CultureNotFoundException
   at System.Globalization.CultureData.GetCultureData(Int32, Boolean)
   at System.Globalization.CultureInfo.InitializeFromCultureId(Int32, Boolean)
   at System.Globalization.CultureInfo..ctor(Int32, Boolean)
   at System.Windows.Input.InputLanguageSource.get_CurrentInputLanguage()
   at System.Windows.Input.InputLanguageManager.get_CurrentInputLanguage()
   at Microsoft.VisualStudio.Text.Editor.Implementation.CaretElement.ConstructCaretGeometry()
   at Microsoft.VisualStudio.Text.Editor.Implementation.CaretElement.UpdateCaret()
   at Microsoft.VisualStudio.Text.Editor.Implementation.CaretElement.OnRender(System.Windows.Media.DrawingContext)
   at System.Windows.UIElement.Arrange(System.Windows.Rect)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(System.Object)
   at System.Windows.Media.MediaContext+InvokeOnRenderCallback.DoWork()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(System.Object)
   at System.Windows.Media.MediaContext.RenderMessageHandler(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 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)

1 个答案:

答案 0 :(得分:0)

问题是Windows默认使用“未知语言”。这使Visual Studio崩溃 如果我打开VS,更改语言,然后打开解决方案,它的工作原理。

This answer解决了“未知语言”问题。

相关问题