41

For older version of Visual Studio it was a simple tweak in registry

http://codebetter.com/darrellnorton/2004/04/21/get-visual-studio-syntax-highlighting-for-alternate-file-extensions/

But for Visual Studio 2010+ the same key doesn't exist in registry so how to do it now ?

user310291
  • 36,946
  • 82
  • 271
  • 487
  • 3
    Use Tools + Options, Text Editor, File Extension. Type the extension string, pick the editor, click Add. Look around some more, this was supposed to be discoverable. – Hans Passant Feb 01 '14 at 16:08
  • Right-click, open with, set as default, from http://stackoverflow.com/a/28374140/492 – CAD bloke Jan 23 '16 at 07:37

1 Answers1

71

Go to Tools -> Options -> Text Editor -> File Extension and type your alternative extension and then associate it with your editor (e.g. Microsoft Visual C++)

Darien Pardinas
  • 5,910
  • 1
  • 41
  • 48