Here’s a feature that you might have missed in Visual Studio 2013 RC. It’s one of my absolute favorite features because it solves a very common problem that I often run into when building websites.

I think it’s better to just show you what this feature does instead of writing about it. Check out the video below.

[youtube:Uunhw75GJL8]

This means you no longer have to manually add references to any JavaScript file in order to get Intellisense for that file. When auto-sync is enabled in /Scripts/_references.js then you will always have Intellisense for all your .js files in your project no matter where they are located.

Comments

Thomas Jespersen
Nice... But I don't like the convention about the scripts folder. Pls. make it configurable.
Thomas Jespersen
Mads Kristensen
It is configurable under Tools -> Options -> Text Editors -> JavaScript. You can set it to any folder name you'd like, but by default it has to be in the [b]~/Scripts/[/b] folder
Mads Kristensen
jonathan
Can't see the option Mads - I opened Tools -> Options -> Text Editor [NO 'S'] -> JavaScript and couldn't see any place I could change this
jonathan
Niels
Hi,

its there also a way to avoid certain folders to be included automatically?
I ask, because we are working with an Eclipse workspace which has lot's of "target" folders etc.
As the whole developer experience in VS is much better and I get more support in writing code I created a website-project to be able to work with the Eclipse workspace (a normal project does not work as newly added files are not added automatically). 
So suppressing some folders/files to be added automatically would be very helpful.

Thanks
Niels
roelvanlisdonk.nl
Pingback from roelvanlisdonk.nl

Nice: Auto-sync JavaScript Intellisense in VS2013 RC
roelvanlisdonk.nl
Lee
I have a separate project for each area within my solution. I then place all scripts within each project under ProjectPath\Assets\Scripts. Each asset is then embedded. Will I still be able to use all/some of this functionality?
Lee
Mads Kristensen
Lee,

I believe you need a /script/_references.js per project. I'm not sure if it will pick up the _references.js from the parent project, but I don't believe it will.
Mads Kristensen
Leonid
Hi,
There are no both "Auto-sync JavaScript References" and "Update JavaScript References" in my "RightClick" menu in "_references.js" (VS2013)
Leonid
Mads Kristensen
@Leonid, is your _references.js file inside the /Scripts/ folder?
Mads Kristensen
Javid
Hello
I have a web-project (created using the empty project template). I added the _references.js file inside my Scripts folder. Right-clicking inside this file and selecting 'update JS references' added references to all JS files that I had in the solution, but I still don't get any Intellisense. 
Any idea? (I am using VS 2013 Ultimate)
Javid

Comments are closed