I have a number of my own .js files containing javascript code in a MVC4 project in Visual Studio 2012. The intellisense does not work in these .js files and the error checking is showing spurious errors such as 'Too many characters in character literal' and 'a namespace cannot directly contain members such as field'.
I think what is happening is that it is not identifying the code as javascript (including the jquery files auto added by the mvc4 template). Possibly the file type .js is not associated to Javascript. I've tried Tools -> Optioins -> Text Editor -> File Extension & added js as Script Editor but that didn't work.
If I put a script block in a cshtml page it identifies my Javascript code perfectly but I need to separate my js into separate files.
Any help would be much appreciated :-)