27

I'm getting a little bit crazy right now. My company switched from VS2008 to VS2012 and by now I couldn't find any option to enable code highlighting for structs.

In VS2008 something like

public Color Foreground {get;set;}

the keyword Color would be highlighted because it's a well known and defined struct.

In VS2012 the highlighting feature doesn't work for structs anymore.

Does anyone else also noticed? Has anyone a solution? I went through all the Color Options and tried everything but I can't get the good old struct highlighting color back.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
LazyGeek
  • 549
  • 5
  • 12

4 Answers4

27

It works fine for me, in VS2012:

enter image description here

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

enter image description here

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

Blachshma
  • 17,097
  • 4
  • 58
  • 72
  • 4
    I finally found a solution. Your screenshot was pointing me at the right direction. It turns out I had the default colors enabled and User Types (Value types) was set to the same color as in your screenshot BUT I had also installed the "Productivity Power Tools" and this plugin is responsible for overriding the default color settings not highlighting the structs anymore. After disabling the addin the colors are back to normal. – LazyGeek Jan 10 '13 at 10:01
  • 3
    @user1966041 You can also disable 'Colorized Parameter Help' in the Productivity Power Tools options rather than disabling the whole extension. See my answer for more information. – Paccc Jan 12 '13 at 20:46
  • 1
    thanks for this it was the productivity tools causing the issue. I just turned off the Colorized Parameter Help and that fixed it. – Somedeveloper Aug 02 '13 at 16:18
  • 1
    me too prod tools was the issue for me with framework structs e.g. DateTime – MemeDeveloper Aug 21 '13 at 21:40
  • I have found that if I change the color from Default and back then it works. – Valentin Jul 31 '14 at 07:47
27

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

PPT Colorized Parameter Help

Also see this bug report for more information.

Paccc
  • 1,211
  • 13
  • 15
  • If this doesn't work, try reinstalling Productivity Power Tools completely. That finally did it for me. – DLeh Sep 30 '14 at 01:22
0

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

RobSiklos
  • 8,348
  • 5
  • 47
  • 77
0

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

JD Stuart
  • 547
  • 1
  • 3
  • 13