10

This is the second time i have installed VS 2012 and the first time the color formatting for xaml was working but not anymore. If i can change some element in the tools -> fonts and colors but i cant get the normal default scheme back with the blue | red | yellow look, even if i change back to defaults.

Any help would be nice. Thanks

  • Do you mean that `*.xaml` files are loaded but appear as if it's a plain text document (i.e. black-on-white)? – Dai Nov 28 '12 at 18:08
  • Well the designer displays for the *.xaml document but the text editor has no color formatting. Even if i change colors in the options environment. The only color that changes is the main font color but nothing else. If i try change the comment color it just stays the same as the color that is defined for the main font, which all the text is. –  Nov 29 '12 at 12:04
  • Try to re-install again VS2012 – Epsil0neR Dec 07 '12 at 13:01
  • I have twice. I also did the whole repair thing –  Dec 07 '12 at 13:39
  • 3
    Have you tried Tools -> Options -> Environment -> Fonts & Colors and in the 'Display items' list scroll down to the XAML items and click 'Use defaults'? Or running "devenv /resetuserdata" in a command prompt? Also, I'm confused, how can you offer a bounty of 50 when you only have 33? Interesting... – Chris W. Dec 07 '12 at 19:10
  • I do not see any options for Xaml in the Display items. There is only XML near the bottom. Well I had 73 . I am guessing the points are removed once the bounty is put in place not once i have given it out. –  Dec 10 '12 at 09:39
  • Do you have any plug-ins installed? ReSharper or CodeRush? – Seamus Dec 13 '12 at 18:01
  • I do yes ... not coderush or resharper but others. The thing is that when i installed it, before i had added the extensions its was just plain colorless xaml. I think my pc is up for a reformat. –  Dec 15 '12 at 07:33
  • @ChrisW. - Thanks - "devenv /resetuserdata" worked for me. – Morten Frederiksen Feb 01 '13 at 10:20
  • The other thing you can do is change your theme from light -> dark or dark -> light and back. – Ryan Lanciaux May 21 '14 at 15:19

3 Answers3

14

I've had this exact same issue. The solution is:

  • close all running instances of Visual Studio
  • open a "Run" window and type in devenv /resetuserdata

That's it. Open your projects again and everything should work fine. Beware: your personal settings will be lost. Recently opened projects list also.

Marius Bughiu
  • 997
  • 14
  • 32
3

Right click on the .xaml file -> open with option from the list choose HTML Editor With Encoding

sbeci
  • 31
  • 2
0

You can try Tools -> Options -> Environment -> Fonts & Colors and Display Items as Use Defaults..as suggested by gerdi...Also make sure all options are ticked Under Tools -> Options -> TextEditor -> General...

Hardik
  • 283
  • 1
  • 8
  • 19
  • 1
    I am gerdi .. gerdi created this question outlining that this did not work. Thanks though –  Dec 15 '12 at 07:31