p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Javascript How-To (http://p2p.wrox.com/forumdisplay.php?f=87)
-   -   Visual Studio 2010 and JQuery Intellisense (http://p2p.wrox.com/showthread.php?t=78454)

PeterPeiGuo March 5th, 2010 07:48 PM

Visual Studio 2010 and JQuery Intellisense
 
Visual Studio 2010 has very nice jQuery intellisense support, but I have to add a hint at the top of my javascript file - a reference path to the vsdoc file.

Is this how it supposed to be? I am using Visual Studio 2010 beta 2 and JQuery 1.4.2. By the way, does anybody know whether there is a vsdoc for 1.4.2? I am using 1.3 vsdoc.

Imar March 6th, 2010 08:37 AM

Hi there,

Version 1.4.2 of the jQuery library was recently released and it takes some time before the VS doc file becomes available. You can find the 1.4.1 version here: http://www.asp.net/ajaxlibrary/cdn.ashx

Most of the times, VS will figure out the doc file based on the script files you're referencing. In a JavaScript file it makes sense. VS doesn't know where this file is going to be used, and thus doesn't know what other script files are available. Adding an XML doc reference fixes the problem and brings the documentation in the referenced file in scope.
You may want to up upgrade from beta 2 to the RC version.

Cheers,

Imar

PeterPeiGuo March 6th, 2010 01:03 PM

From VS design point of view... If I use jquery for javascript, likely I will use it consistently. So a better way is to have a VS setting that lets me specify jquery vsdoc as the default for all javascript files, instead of having to comment each file.

Imar March 6th, 2010 01:09 PM

It has to know you're using jQuery somehow. It does this (AFAIK), by following script references in pages and other files that are in scope.

Try http://connect.microsoft.com if you want to file enhancement requests for VS....

Cheers,

Imar

PeterPeiGuo March 6th, 2010 01:15 PM

I will submit a request for enhancement. Thanks.


All times are GMT -4. The time now is 01:52 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.