How to Get User Type C# Syntax Highlighting Working Again in VS 2012 Rc

How can I get user type C# syntax highlighting working again in VS 2012 RC?

Here is a simple solution. Go to the directory where devenv is (for 2012 RC), and type devenv.exe /setup. It will fix your problem.

devenv.exe is usually in something like C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE.

Edit: It has been suggested that you do this from the Visual Studio command prompt (Start>Microsoft Visual Studio>Tools>Visual Studio Command Prompt), and/or make sure your command prompt has administrator permissions.

Note for others: This has a very good chance of working for many other versions of Visual Studio, including 2008, 2010, 11 beta, ...

No syntax highlighting or intellisense for C# files in VS 2012

I found I also had Visual Studio 2012 Web Express RC installed. When I uninstalled this, C# intellisense and syntax highlighting magically started to work.

Visual Studio 2013 - User types color is gone

I had the same issue in VS2013, fixed that with devenv.exe /setup

See
How can I get user type C# syntax highlighting working again in VS 2012 RC?

Visual Studio 2012 Code Highlighting for structs

It works fine for me, in VS2012:

Sample Image

What you're looking for is the User Types (Value types) color in

Tools -> Options -> Environment -> Fonts and Colors

Sample Image

If that doesn't help, you should check that you don't have an external addin that might be changing the colors...

Update - based on your comment - if you're using the Productivity Power Tools you might need to disable the Colorized Parameter Help Option from Tools -> Options -> Productivity Power Tools -> Colorized Parameter Help...

Another option is to try to Repair your installation of VS2012

Syntax highlighting VS2012 C++ and OpenCV, libraries

It works when there is no error and no warning in the code. So that pesky warning about the fact that implicitly casting a double to a float results into a loss of precision needs to be addressed (make it go!) in order to make it work...

I don't remember which page but there was I think such a warning on the Intellisense help page of the MSDN site...

Anyway, the bottom line is that, if your Intellisense seems to work (auto-completion, etc.) but fails at the syntactic coloration, a possible culprit is the presence of errors or warning in one of your files.

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

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.

Visual Studio 2015 not syntax highlighting razor nor Intellisense

I've found in this answer another way to fix it without the devenv.exe /ResetUserData

Just delete the contents of this directory with Visual Studio closed:
%LocalAppData%\Microsoft\VisualStudio\<visual_studio_version_number>\ComponentModelCache

To find the version number of the Visual Studio edition your are running please refer this list. Note that only the major number is important, the minor version can and will probably differ. In my case I had Visual Studio 2017 Enterprise installed so I looked for 15.xx and found 15.0_9a1c4a06 inside the AppData folder.



Related Topics



Leave a reply



Submit