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

前端 未结 19 2210
无人及你
无人及你 2020-11-27 12:23

Somehow part of my syntax highlighting for C# code has disappeared in the VS 2012 IDE. Uninstalling, rebooting, and reinstalling does nothing, nor does resetting the colors

相关标签:
19条回答
  • 2020-11-27 12:26
    1. delete all in C:\Users\userNAme\AppData\Roaming\Microsoft\VisualStudio\11.0
    2. open vs console as administrator, and run:

      devenv.exe /setup
      devenv.exe /ResetSettings
      

    This solution worked for me. Thanks alot Gaz Winter

    0 讨论(0)
  • 2020-11-27 12:30

    1 - delete all in C:\Users\userNAme\AppData\Roaming\Microsoft\VisualStudio\11.0 2 - open vs console as administrator, and run: devenv.exe /setup devenv.exe /ResetSettings1 - delete all in C:\Users\userNAme\AppData\Roaming\Microsoft\VisualStudio\11.0 2 - open vs console as administrator, and run: devenv.exe /setup devenv.exe /ResetSettings

    This is what helped me...

    0 讨论(0)
  • 2020-11-27 12:31

    If none of the above work for you, delete all GUID-named folders under this registry key (make sure your Visual Studio instance is closed):

    If you're using Visual Studio 2012: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\FontAndColors

    If you're using Visual Studio 2013: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors

    If you're using Visual Studio 2015: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\FontAndColors

    Restart Visual Studio, and you should see a few various "User Types" to configure. You can then import your Fonts and Colors that you backed-up, and everything will be good to go. This may also work for previous and future versions of VS, but I have not tested.

    Disclaimer: Make sure you export/backup your current Fonts and Colors settings before making these registry adjustments. I cannot be held responsible for you losing your configs :)

    0 讨论(0)
  • 2020-11-27 12:31

    I had the same issue....just uninstalling and re-installing alone did not correct the problem. After I un-installed, deleted all remnants of VS 2012 in program files, removed all related registry keys, and deleted the VS 2012 folder from My Documents, then re-installed, user types showed up in the display items in fonts and colors and everything went back to normal. My guess is that it was an issue with one or more of the registry keys but I can't be sure of that.

    0 讨论(0)
  • 2020-11-27 12:35

    If anybody runs in to the same problem for Visual Studio 2013 as I did, the only solution that worked for me was to first close VS2013 and then delete the following registry key:

    HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors
    

    After reopening VS2013, my syntax highlighting for types was restored.

    Prior to deleting the registry key, I noticed that all of the "User Types..." settings in the Fonts and Colors section of Tools > Options were missing. Deleting the registry key restored them. They attained their default values which gave me the syntax highlighting colors I was looking for.

    This was the only solution that worked for me. Switching themes, resetting my personalized settings to defaults, running devenv.exe with various command line switches to setup/reset Visual Studio did not work.

    I also created the following bug report with Microsoft on their Connect site:

    http://connect.microsoft.com/VisualStudio/feedback/details/810985/incorrect-syntax-highlighting-for-c-types.

    0 讨论(0)
  • 2020-11-27 12:35

    I already had VS 2012 Pro installed on my machine. I then installed VS 2013 Pro and started facing this color issue. I then deleted the HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors key and opened VS 2013. This approach solved my issue and the colors were back.

    0 讨论(0)
提交回复
热议问题