Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010 - Intellisense for jQuery 1.4.4

I tried going through some of the other questions here at Stack, aswell as searching google but i mostly get hits in korean/japanese/chinese.

Anywho im running VS2010 its a MVC3 Project, im using a _layout masterpage using jQuery 1.4.4 along with a matching vsdoc for that version (downloaded today from MS so it should be the newest).

This is the content of the _layout page im using: http://pastebin.com/fB6FzaLS Not sure if its needed or not, but i added the code to enable the jQuery vsdoc (and the path is correct).

Whenever i Ctrl+Space the dot after the jQuery pointer i get this error in my output panel:

Javascript Intellisense Message: JSIntellisense:Internal/window(2:4) : Function expected

The intellisense suggestions it comes up with are extremely generic (constructor, valueof etc. about 7 ish in total)

In Extension manager i have disabled everything but the VisualStudio JScript enhancements (brackets, word highligther etc)

Any ideas what might be the problem here?

like image 650
mfriis Avatar asked Oct 11 '22 15:10

mfriis


1 Answers

I'm wondering whether you're getting a conflict with the two instances of jQuery.

Two observations. Firstly, if all you're looking for is simple intellisense, VS2010 will do a very good job with the default jQuery reference. That said, I think your problem would be resolved by moving your JS into an external script file, and adding a reference to the VSDOC into that file instead.

Incidentally, jQuery 1.5.1 is out if you're looking for the most up to date version.

Rich

like image 121
kim3er Avatar answered Oct 18 '22 11:10

kim3er