Visual Studio is a great tool but not all tooling is well known. I see this question still way too often on the ASP.NET forums so I thought I would blog about it.
Problem:
You have a nice -vsdoc.js file sitting in your solution explorer and are used to get that great Intellisense kicking in when you work inside a webpage or webform doing some cool ASP.NET coding.

Figure 1: Solution Explorer showing our –vsdoc.js files
However if you want to follow good habits and make use of best practices and opt for a non obtrusive javascript approach, meaning simply that you put your script in a separate file with .js extension, you find yourself out of luck. Intellisense is gone!

Figure 2: No Intellisense when we expect to see some assistance for jQuery
Yikes!
Solution:
Of course there’s a solution. And luckily for us, a very easy one:
- Open the .js file
- In the Solution Explorer pick the right –vsdoc.js file
- Drag and drop that in the .js file like in figure 3
- Now try to type $( again and you’ll see like in figure 4 that Intellisense is back again.
- Drink a beer and celebrate (this last step isn’t really necessary but can spice up the fun factor)

Figure 3: Drag and drop from the Solution Explorer into the opened .js file

Figure 4: Intellisense is way back. Woohoo!
Grz, Kris.