Visual Studio 2012 Code Highlighting for structs

走远了吗. 提交于 2019-11-28 20:20:23

It works fine for me, in VS2012:

What you're looking for is the User Types (Value types) color in
Tools -> Options -> Environment -> Fonts and Colors

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

I have also run into this problem and I have found the culprit to be the Productivity Power Tools. There is a workaround to get the syntax highlighting for structs to reappear. You have to turn off Colorized Parameter Help in the Productivity Power Tools options and restart Visual Studio.

This can be found at Tools > Options > Productivity Power Tools > Colorized Parameter Help

Also see this bug report for more information.

I think I found another solution to this problem, which lets you leave the Colorized Parameter Help feature turned on.

In Fonts and Colors, I specified a value for the "Signature Help - User Types(Value Types)" item, and I don't have the problem any more.

Note: I also have the Color Theme Editor extension installed - I'm not sure if this plays any part in the effectiveness of the workaround (but I had it installed before as well, so the extension alone didn't fix the problem).

Also, someone posted the bug on MS Connect: http://connect.microsoft.com/VisualStudio/feedback/details/770603/text-editor-the-type-color-for-structs-is-black

I've tried turning off the Colorized Power Tools parameter, uninstall and reinstall Power Tools and "Repair" of Visual Studio, none of which worked.

What ended up working was deleting the .suo and .dotSettings files in the same directory as the Solution File (.sln).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!