Visual Studio patched for better jQuery IntelliSense
Jeff King just announced the release of a patch for Visual Studio 2008 that enables the IDE to find the –vsdoc.js file without requiring the developer to reference it.
To give some context, a documentation file (basically the same file as the runtime script but with XML documentation annotations) can be provided to help Visual Studio provide IntelliSense. Until now, you had to reference that extra file explicitly, usually within a server-side <% if %> block so that the file never gets included at runtime.
Now that this patch shipped, this is no longer necessary and Visual Studio is going to be able to find the –vsdoc.js file for any script file that is referenced, whether that is through a ScriptManager ScriptReference:
or using a plain script tag:
or even a reference XML tag:
That makes jQuery IntelliSense as easy as dropping the –vsdoc.js file in the web site next to the main jQuery file (other libraries can easily take advantage of that too of course):
Pretty sweet.
The patch can be found here:
http://code.msdn.microsoft.com/KB958502/Release/ProjectReleases.aspx?ReleaseId=1736
The IntelliSense file for jQuery can be downloaded from the jQuery servers (look for the “documentation: Visual Studio” file):
http://docs.jquery.com/Downloading_jQuery#Download_jQuery
Jeff’s other post on using the documentation file:
http://blogs.msdn.com/webdevtools/archive/2008/10/28/rich-intellisense-for-jquery.aspx
The format for XML doc comments:
http://weblogs.asp.net/bleroy/archive/2007/04/23/the-format-for-javascript-doc-comments.aspx