_references.js file – The Ultimate Flashback


0

Visual Studio 2013 RTM was shipped with a feature – /// <autosync enabled=”true” /> for _references.js file.

If you specify the above code in the beginning of ~/scripts/_references.js, then any addition, rename, deletion of JavaScript files in the project will automatically change the content in this file. It is also possible to disable this feature by providing a code like /// <autosync enabled=”false” />

In order to work with the feature, you need to create a new MVP project and open scripts/_references.js file. You will view a screenshot as shown below

Visual Studio 2013 RTM

You can drag and drop bootstrap.js file to the Scripts folder to make a copy. You will be able to see that all the missing “.js” files and the newly added “.js” files are automatically referenced in the _references.js file.

Visual Studio 2013 RTM

Mads Kristensen has published a detailed blog post which examines the complete story behind _references.js.

You can easily activate the auto sync feature via editor’s context menu button “Auto-sync JavaScript References”. Moreover, you can manually update the project’s JavaScript references using the context menu button “Update JavaScript References”.

Visual Studio 2013 RTM

“The _references.js file controls a key part of the JavaScript Intellisense in Visual Studio for web projects and can mean the difference between awesome Intellisense and none at all”. said Kristensen.


Like it? Share with your friends!

0

What's Your Reaction?

hate hate
0
hate
confused confused
0
confused
fail fail
0
fail
fun fun
0
fun
geeky geeky
0
geeky
love love
0
love
lol lol
0
lol
omg omg
0
omg
win win
0
win
Anand Narayanaswamy
Anand Narayanaswamy is the editor-in-chief of Learnxpress. He was a Microsoft Most Valuable Professional (MVP) for a period of 9 years. He is a ASPInsider based in Trivandrum, Kerala State, India. Anand is the author of Community Server Quickly published by Packt Publishing.

0 Comments

Your email address will not be published. Required fields are marked *