Visual studio 打开CSS文件会使Visual Studio崩溃
当我使用VS 2015在任何Cordova项目中打开CSS文件时,它会崩溃: 遇到异常。这可能是由于 分机。您可以通过检查该文件获得更多信息 “C:\Users\a\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml” 在那里查看显示:Visual studio 打开CSS文件会使Visual Studio崩溃,visual-studio,cordova,visual-studio-cordova,Visual Studio,Cordova,Visual Studio Cordova,当我使用VS 2015在任何Cordova项目中打开CSS文件时,它会崩溃: 遇到异常。这可能是由于 分机。您可以通过检查该文件获得更多信息 “C:\Users\a\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml” 在那里查看显示: Editor or Editor Extension System.ArgumentException: The value passed in must be an enum base or
Editor or Editor Extension
System.ArgumentException: The value passed in must be an enum base or an underlying type for an enum, such as an Int32.
Parameter name: value
at System.Enum.ToObject(Type enumType, Object value)
at Microsoft.VisualStudio.Shell.DialogPage.SetPropertyValue(PropertyDescriptor descriptor, Object automationObject, Object value)
at Microsoft.VisualStudio.Shell.DialogPage.LoadSettingFromStorage(PropertyDescriptor prop)
at Microsoft.VisualStudio.Shell.DialogPage.LoadSettingsFromStorage()
at Microsoft.VisualStudio.Shell.DialogPage.set_Site(ISite value)
at System.ComponentModel.Container.Add(IComponent component, String name)
at System.ComponentModel.Container.Add(IComponent component)
at Microsoft.VisualStudio.Shell.Package.GetDialogPage(Type dialogPageType)
at Microsoft.VisualStudio.Html.Package.Package.CSS.CssPackage.GetAutomationObject(String name)
at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.GetAutomationObject(String propName, Object& auto)
at Microsoft.VisualStudio.Html.Package.Options.Common.WebSettingsStorageWithDialog.LoadFromStorage()
at Microsoft.Web.Editor.Host.WebEditor.GetSettings(String contentTypeName)
at Microsoft.CSS.Editor.Settings.CssSettings.get_Storage()
at Microsoft.VisualStudio.Html.Package.TaskList.CSS.CssErrorTaskProvider..ctor(ITextView textView, ITextBuffer textBuffer)
at Microsoft.VisualStudio.Html.Package.TaskList.CSS.CssErrorTaskProvider.Attach(ITextView textView, ITextBuffer textBuffer)
at Microsoft.VisualStudio.Html.Package.TaskList.CSS.ErrorTaskSetup.OnTextViewCreated(ITextView textView, ITextBuffer textBuffer)
at Microsoft.Web.Editor.Controller.TextViewConnectionListener.OnTextViewGotAggregateFocus(ITextView textView, ITextBuffer textBuffer)
at Microsoft.VisualStudio.Html.Package.Commands.CSS.VsCssTextViewConnectionListener.OnTextViewGotAggregateFocus(ITextView textView, ITextBuffer textBuffer)
at Microsoft.Web.Editor.Controller.TextViewConnectionListener.<>c__DisplayClass24_0.<OnTextViewConnected>b__0(Object sender, EventArgs eventArgs)
at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent(Object sender, EventHandler eventHandlers)
编辑器或编辑器扩展
System.ArgumentException:传入的值必须是枚举基或枚举的基础类型,如Int32。
参数名称:value
位于System.Enum.ToObject(类型enumType,对象值)
位于Microsoft.VisualStudio.Shell.DialogPage.SetPropertyValue(PropertyDescriptor描述符、对象自动对象、对象值)
位于Microsoft.VisualStudio.Shell.DialogPage.LoadSettingFromStorage(PropertyDescriptor prop)
在Microsoft.VisualStudio.Shell.DialogPage.LoadSettingsFromStorage()中
在Microsoft.VisualStudio.Shell.DialogPage.set_站点(ISite值)
在System.ComponentModel.Container.Add处(IComponent组件,字符串名称)
位于System.ComponentModel.Container.Add(IComponent组件)
在Microsoft.VisualStudio.Shell.Package.GetDialogPage(键入dialogPageType)
位于Microsoft.VisualStudio.Html.Package.Package.CSS.CssPackage.GetAutomationObject(字符串名称)
位于Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.GetAutomationObject(字符串propName、Object和auto)
在Microsoft.VisualStudio.Html.Package.Options.Common.WebSettingsStorageWithDialog.LoadFromStorage()上
位于Microsoft.Web.Editor.Host.WebEditor.GetSettings(字符串contentTypeName)
在Microsoft.CSS.Editor.Settings.CssSettings.get_Storage()中
位于Microsoft.VisualStudio.Html.Package.TaskList.CSS.CssErrorTaskProvider..ctor(ITextView textView,ITextBuffer textBuffer)
位于Microsoft.VisualStudio.Html.Package.TaskList.CSS.CssErrorTaskProvider.Attach(ITextView textView,ITextBuffer textBuffer)
在Microsoft.VisualStudio.Html.Package.TaskList.CSS.ErrorTaskSetup.OnTextViewCreated(ITextView textView,ITextBuffer textBuffer)
在Microsoft.Web.Editor.Controller.TextViewConnectionListener.OnTextViewGotAggregateFocus(ITextView textView,ITextBuffer textBuffer)
位于Microsoft.VisualStudio.Html.Package.Commands.CSS.VsCssTextViewConnectionListener.OnTextViewGotAggregateFocus(ITextView textView,ITextBuffer textBuffer)
在Microsoft.Web.Editor.Controller.TextViewConnectionListener.c_uuuDisplayClass24_0.b_uu0(对象发送方,事件参数EventArgs)
位于Microsoft.VisualStudio.Text.Utilities.GuardeOperations.RaiseEvent(对象发送器、事件处理程序和事件处理程序)
我已尝试重新启动计算机,清除.VS文件夹和.user文件。我所知道的唯一安装的扩展是Ankhsvn。看起来像Visual Studio 2015中的一个bug。确保您的VisualStudio是最新的。如果问题在2015年的最新版本中再次出现,您可能需要向报告。我在加载CSS文件时遇到了类似的问题。我遇到的问题是,我的VisualStudio与云端的设置同步。我以前安装了一个扩展,这个设置被同步到云。当我不再使用扩展时,VS仍然尝试同步设置,但失败了 我在打开CSS文件时总是出错,无法打开“工具选项”“文本编辑器”“CSS高级”对话框 对我来说,以下几点很有帮助:
希望这对你也有帮助。我在Visual Studio社区网站上找到了一篇适合我的帖子。 除了在编辑css文件时崩溃之外,我还注意到这个症状:进入菜单 工具/选项/文本编辑器/CSS部分/高级显示“加载此属性页时出错” 问题似乎是高级设置正在使其崩溃 修复是由chris在 运行regedit,查找HKEY_当前用户\软件\ Microsoft\ VisualStudio\14.0\ApplicationPrivateSettings\TextEditor\CSS 分支并删除其中的特定部分 如果编辑工具/选项/文本编辑器/Css部分/Advanced 它将恢复已删除但这次已删除的注册表项 打开.css文件时没有错误 我退出了Visual Studio,删除了上面的注册表项,启动了Visual Studio,进入“选项”菜单只是为了设置几个选项(并让它重新创建键,以防万一),然后我可以打开css文件。对我不起作用:-(并且丢失了我所有的IDE配置)