Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010: Javascript Highlighting

I'm using VisualStudio 2010 with VS.PHP. When I write or open a javascript file it is not higlighted and intellisense is not working. All I see is plain text. It seems that VS does not "identify" the javascript file. When I manually order js files to open in Script editor (in Tools > Options > Text Editor > File Extension), nothing changes. Highlighter in (in Tools > Options > Environment > Tools and colors) is set properly. Do you have any ideas how can I run highlighting? Google says nothing.

like image 842
Martin Strouhal Avatar asked Aug 01 '11 21:08

Martin Strouhal


2 Answers

You probably removed the "Web Developer 2010" component when installing your Visual Studio. Or you are using one of the Express editions.

like image 154
Roman Starkov Avatar answered Sep 18 '22 04:09

Roman Starkov


I've had the same problem, and I just found a solution that works for me.

  • Open VS 2010
  • Select Tools / Options... from the menu
  • Open the Text Editor / File Extension property page
  • Add an entry for the "js" file extension and set the editing experience to "Script Editor"

I still don't know why this doesn't work out of the box, but at least this fixes the issue.

like image 23
Paul M. Parks Avatar answered Sep 22 '22 04:09

Paul M. Parks