Plain C# Editor in Visual Studio 2012 (No intellisense, no indentation, no code highlighting)

后端 未结 8 1898
情书的邮戳
情书的邮戳 2020-12-07 22:30

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 pro

相关标签:
8条回答
  • 2020-12-07 22:57

    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:

    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".

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

    0 讨论(0)
  • 2020-12-07 23:00

    I just had the same issue as you and followed the instructions I found here.

    The part I found that worked was:

    1. Try running devenv /Resetsettings in Command Prompt to eliminate the cause of corrupted settings.
    2. Try running devenv /ResetSkipPkgs in Command Prompt.
    3. Try running devenv /Safemode in Command Prompt to see if you can apply it correctly.
    4. Try running devenv /Resetuserdata in Command Prompt to reset all of your VS environment and customization settings.
    0 讨论(0)
提交回复
热议问题