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

前端 未结 19 2416
无人及你
无人及你 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: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.

提交回复
热议问题