css - 尝试打开 CSS 文件时 Visual Studio 2012 和 Web Essentials 2012 崩溃

标签 css visual-studio-2012

我在 Windows Server 2012 上安装了 Visual Studio 2012 RTM Plus 更新和 Web Essentials 2012 V1.7,当我打开 CSS 文件时出现以下崩溃。

System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Web.Editor.ComponentLocatorWithOrdering2.ImportMany() at Microsoft.Web.Editor.ComponentLocatorForContentType1.FindFirstOrderedComponent(String contentTypeName) at Microsoft.CSS.Editor.CssEditorDocument.InitializeTextBuffer(ITextBuffer textBuffer) at Microsoft.CSS.Editor.CssEditorDocument.FromTextBuffer(ITextBuffer textBuffer) at MadsKristensen.EditorExtensions.DisplayInlineTextViewCreationListener.SubjectBuffersConnected(IWpfTextView textView, ConnectionReason reason, Collection`1 subjectBuffers) at Microsoft.VisualStudio.Text.Editor.Implementation.ConnectionManager.<>c_DisplayClass8.<.ctor>b_1() at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object errorSource, Action call)

我已经以另一个用户而不是本地管理员身份登录,但我仍然遇到崩溃。 (我必须以具有管理员权限的普通用户身份登录,因为我猜出于安全原因,某些 ide 不会在本地管理员的上下文中运行)。

我已经卸载、重新安装、执行 devenv/resetuser data,但它仍然崩溃。

如果我卸载 Web Essentials 2012 v1.7(和 1.4、1.5 等),它就会停止崩溃。在 V1.4 之前,我相信它工作正常。可能是环境中发生冲突的其他扩展,如工作台工具,但我看不到任何添加的东西,我已经卸载了我能想到的所有东西。

我想追踪这个错误并了解扩展安装顺序并尝试了解它要做什么,这样我就有了一些可能影响它的线索。

上一个条目

"Begin package load [Visual Studio CSS Editing Package] {A764E895-518D-11D2-9A89-00C04F79EFC3} VisualStudio 2012/11/12 12:10:02.504 484 Loading UI library C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Packages*\CSSPkgUI.dll {A764E895-518D-11D2-9A89-00C04F79EFC3} VisualStudio 2012/11/12 12:10:02.504 485 End package load [Visual Studio CSS Editing Package] {A764E895-518D-11D2-9A89-00C04F79EFC3} VisualStudio 2012/11/12 12:10:02.505 "

据我所知,Microsoft Web 编辑器正试图将编辑缓冲区的内容移交给 Web Essentials Editor 扩展并崩溃。

事件日志

Application: devenv.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.NullReferenceException Stack: at Microsoft.Web.Editor.ComponentLocatorWithOrdering2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].ImportMany() at Microsoft.Web.Editor.ComponentLocatorForContentType1[[System._Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].FindFirstOrderedComponent(System.String) at Microsoft.CSS.Editor.CssEditorDocument.InitializeTextBuffer(Microsoft.VisualStudio.Text.ITextBuffer) at Microsoft.CSS.Editor.CssEditorDocument.FromTextBuffer(Microsoft.VisualStudio.Text.ITextBuffer) at MadsKristensen.EditorExtensions.HighlightWordTagger.EnsureInitialized() at MadsKristensen.EditorExtensions.HighlightWordTagger.UpdateAtCaretPosition(Microsoft.VisualStudio.Text.Editor.CaretPosition) at MadsKristensen.EditorExtensions.HighlightWordTagger+<>c_DisplayClass3.b__2() 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)

我注意到它提到了 highlightword 标记器。那是线索吗? (或者只是第一个调用点?),我也没有在 html 文件中突出显示颜色语法。

我在一台单独的 Windows 8 笔记本电脑上也多次遇到同样的崩溃,有一天,在我卸载并重击它之后,错误就消失了,我尝试了很多禁用、启用、往返,很难想象会发生什么已经修好了。

是否有任何其他日志可供我追踪?

最佳答案

这在最新的每晚构建中得到修复。您可以在这里获取:http://madskristensen.net/custom/webessentials2012.vsix?v=1.7.4

安装 nightly 不会影响将来通过 VS 自动安装的任何更新。

关于css - 尝试打开 CSS 文件时 Visual Studio 2012 和 Web Essentials 2012 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13345018/

相关文章:

jquery - 将 URL 添加到整张照片

css - 带有 Apache2 的 Django 管理页面

html - Bootstrap 3 拉和推不按预期运行

c++ - 使用 MFC 以 Windows XP 为目标的 Visual Studio 2012 项目

c# - Visual Studio 2010 项目转换为 Visual Studio 2012

validation - 在 Azure 中,如何排查错误 "ValidateServiceFiles task failed unexpectedly"?

html - CSS 动画 - 所有旋转的单词在初始页面加载时显示

css - 如何创建页内水平导航锚定系统?

windows-phone-7 - 带有 7.1 引用的 Windows Phone 8 应用程序

xml - 在 Visual Studio 中编辑 XML 文档时显示当前元素的 XPath