Search code examples
visual-studiovisual-studio-2013intellisenseprojects-and-solutionsjavascript-intellisense

How to link _references.js file for an empty web application in visual studio


For a normal MVC or web forms project, VS13 adds the javascript intellisense helper file named _references.js. How to do the same for a blank web application ? In other words, how to manually create and link this intellisense file to a new project? Where and how is the _references.js file linked with the project within visual studio?


Solution

  • Your project root should contain a folder called "Scripts." This "Scripts" folder is supposed to contain the "_references.js" file.

    Enter _references.js
    
    This file must (by default) be located in a folder at the root called /Scripts/. 
    That's the naming convention. 
    Any file located at /Scripts/_references.js is automatically added to global Intellisense.
    

    This is the default setting. However, you can even customize the location of the _references.js file and even its name - see this great article for details (from where I quoted the above excerpt as well).