views:

62

answers:

1

I'm not able to get intellisense to work with javascript/jquery code in vs10. Not even getting highlighted opening/closing bracket and parens, much less autocomplete.

In VS08 we had to install a patch to get intellisense for jquery. VS10 doesn't need that patch to support -vsdoc files. There was a bug in 08's intellisense that, if any of a project's included .js files had an error, we'd lose intellisense for javascript. That was supposed to be fixed in vs10.

What the current set of troubleshooting steps to enable intellisense for VS10?

thx

+1  A: 

In a .js file just drag in the jquery-x.x.x-vsdoc.js file from JQuery to get the intellisense. It will add a

/// <reference path="jquery-1.4.1-vsdoc.js" />

tag and enables intellisense.

For inline javascript you can use the same technique, however it generates an javascript include tag like:

<script src="Scripts/jquery-1.4.1-vsdoc.js"type="text/javascript"></script>

After that, the intellisense should work

Rody van Sambeek