Plain C# Editor in Visual Studio 2012 (No intellisense, no indentation, no code highlighting)
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.
Anyone have an idea?
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:
Thanks in advance
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.
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:
- 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.
- Start "VS2012 x86 Native Tools Command Prompt" and run "gacutil /u Microsoft.VisualStudio.CSharp.Services.Language.Interop".
Disclaimer: I'm a dev on the Visual Studio C# IDE team.
It may be that some of the settings are disabled in visual studio. Check the following settings:
Tools->Options->Text Editor->C#->General->Auto list members
Tools->Options->Text Editor->C#->General->Parameter information
EDIT:
Also check
Tools->Options->Text Editor->C#->Intellisense->
Show completion list after a character is typed
Here is an article on ScottGu's blog which can be helpful:D
Second EDIT:
There is one more article on ScottGu's blog titled No Intellisense with VS 2010 RC (and how to fix it). Let me know if that helps. The patch is available here.
Third Edit:
Tools –> Import and Export Settings -> Reset all Settings
You can backup the old settings if you want. This solution is for visual studio 2012. I believe this should work
Fourth Edit: Instead of changing it for only C#, change it for all the languages
Tools > Options > Text Editor > All Languages
In general, ensure that the checkboxes in the Statement Completion section are actively checked (not grayed out). There is a possibility of having a blue square rather than a tick mark. As the tick boxes are 3 state, the square meant that "Partial Selection" was in effect. Once the tick mark is in effect, restart Visual Studio and try it again.
Final Edit:
Looks like the installation is missing some files. I would advise you to download a fresh copy of the software and install it from scratch, with the default settings active.
I just had the same issue as you and followed the instructions I found here.
The part I found that worked was:
- Try running devenv /Resetsettings in Command Prompt to eliminate the cause of corrupted settings.
- Try running devenv /ResetSkipPkgs in Command Prompt.
- Try running devenv /Safemode in Command Prompt to see if you can apply it correctly.
- Try running devenv /Resetuserdata in Command Prompt to reset all of your VS environment and customization settings.
Try deleting:
- %appdata%\Roaming\Microsoft\Microsoft Visual Studio
- %appdata%\Roaming\Microsoft\VisualStudio
- %appdata%\Local\Microsoft\VisualStudio
This should erase all of your visual studio settings (from all versions) and restore it to default, in case some old settings were left behind by the RC that the RTM doesn't like.
Edit:
Also you want to remove
- My Documents/Visual Studio 2012/Settings
If you have vs2012 installed in another disk(say disk D:) than the RC(installed on disk E:), try copying E:\Program Files\Micosoft Visual Studio 11
to the corresponding folder on D:.