在Visual Studio 2012纯C#编辑器(没有智能感知,无压痕,无code高亮) [英] Plain C# Editor in Visual Studio 2012 (No intellisense, no indentation, no code highlighting)

查看:379
本文介绍了在Visual Studio 2012纯C#编辑器(没有智能感知,无压痕,无code高亮)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装的Visual Studio 2012在我的机器,我previously过的Visual Studio 2012 RC这是我之前卸载。安装成功,但之后,我打开一个项目C#的编辑器不工作,就像是一个纯文本编辑器这样的:

I just installed visual studio 2012 in my machine, I previously had visual studio 2012 RC which I uninstalled before. The installation was successful, but after I open a project the C# editor is not working, is just like a plain text editor like this:

我试图修复它,完全卸载,然后重新安装,但没有成功。

I've tried repairing it, uninstalling it completely and then installing again, but no success.

任何人都有一个想法?

我不知道这是否是相关的,但我也收到这个错误的有时创建新项目或打开时,在现有的:

I don't know if it is related, but I'm also getting this error sometimes when creating a new project or when opening an existing one:

在此先感谢

推荐答案

我是pretty的肯定ManagedObjectFactory的错误与您所描述的症状。此错误指示您的Visual Studio安装(特别是C#语言服务)已损坏。这很可能是通过一些设置问题,我们目前正在努力查明造成的。

I'm pretty sure the error about ManagedObjectFactory is related to the symptoms you are describing. This error indicates your Visual Studio installation (particularly the C# language service) is corrupted. Most likely this is caused by some setup issue, which we are currently working to identify.

我有机会来研究这个错误,发现我们的互操作组件之一时意外地安装到GAC,虽然它不应该是。它是由Windows安装程序,这表明这是一个设置问题,安装到GAC。解决方法是从GAC卸载它,而是因为它的安装Windows安装程序,它不仅仅是GACUTIL / U。您需要按照 KB873195 中描述的步骤从GAC中删除:

I had a chance to investigate this error and found that one of our interop assemblies is unexpectedly installed into the GAC, while it shouldn't be. It's installed into the GAC by Windows installer, which indicates this is a setup issue. The fix is to uninstall it from the GAC, but because it's installed by Windows installer, it's more than just "gacutil /u". You need to follow the procedure described in KB873195 to remove it from the GAC:

  1. 删除对应的值Microsoft.VisualStudio.CSharp.Services.Language。互操作自组装HKLM \ SOFTWARE \ Classes下\安装\大会\全球\。注意互操作的部分,因为有也Microsoft.VisualStudio.CSharp.Services.Language组件,它必须是在GAC
  2. 启动VS2012的x86本机工具命令提示符,然后运行GACUTIL / U Microsoft.VisualStudio.CSharp.Services.Language.Interop。
  1. Delete a value corresponding to the "Microsoft.VisualStudio.CSharp.Services.Language.Interop" assembly from the "HKLM\SOFTWARE\Classes\Installer\Assemblies\Global\". Note the "Interop" part because there is also Microsoft.VisualStudio.CSharp.Services.Language assembly, which must be in the GAC.
  2. Start "VS2012 x86 Native Tools Command Prompt" and run "gacutil /u Microsoft.VisualStudio.CSharp.Services.Language.Interop".

免责声明:我在Visual Studio的C#IDE团队开发

Disclaimer: I'm a dev on the Visual Studio C# IDE team.

这篇关于在Visual Studio 2012纯C#编辑器(没有智能感知,无压痕,无code高亮)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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