What is the _references.js used for?

JavascriptVisual Studioasp.net Mvc-4

Javascript Problem Overview


What is the _references.js file used for in a new ASP.NET MVC 4 project?

Javascript Solutions


Solution 1 - Javascript

> In VS 11, Visual Studio will give you intellisense from all files > that have references in the “_references.js” file.

For More Info

Solution 2 - Javascript

MSDN documentation: JavaScript IntelliSense

In brief, _references.js stores the list of JS files paths, for which you want the Visual Studio to gather and build the intelisense (aka "code complete"). The VS project adds there some common JS libraries like jQuery to build the intellisense for it. You can add a reference to your custom JS file in form like this:

/// <reference path="MyScriptFile.js" />

Solution 3 - Javascript

From Visual Studio 2017 forward, this file is no longer used.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionTodd SmithView Question on Stackoverflow
Solution 1 - JavascriptMin MinView Answer on Stackoverflow
Solution 2 - JavascriptDmitry PavlovView Answer on Stackoverflow
Solution 3 - JavascriptMatthew PetersonView Answer on Stackoverflow