views:

945

answers:

2

How can i solve this problem "Error updating JScript IntelliSense: D:\myProject\js\jquery-1.3.2.js: Object doesn't support this property or method @ 2139:1", i did all in this Visual Studio jscript intellisense error with jQuery 1.2.6?

But no hope, should i edit something in my Visual studio options, or Visual studio has a problem?

+4  A: 

Make sure you've got the corresponding vsdoc file sitting beside jquery-1.3.2.js (in /js/ in your case here), and that it's properly named jquery-1.3.2-vsdoc.js.

Also, while I don't think it's strictly necessary in your case, it generally can't hurt to have this hotfix installed: http://blogs.msdn.com/webdevtools/archive/2008/11/07/hotfix-to-enable-vsdoc-js-intellisense-doc-files-is-now-available.aspx

Finally, this is a helpful FAQ on Visual Studio JavaScript Intellisense, by Jeff King (the Program Manager in charge of tooling): http://blogs.msdn.com/webdevtools/archive/2008/11/18/jscript-intellisense-faq.aspx

Dave Ward
did that, with no hope :( and also i wrote "/// <reference path="jquery-1.3.2.js" />" in the top of my js file
Amr ElGarhy
Change that reference path to ~/js/jquery-1.3.2-vsdoc.js (assuming that's the correct full path to your jsdoc).
Dave Ward
Great, it worked, but strange, it was working on my home PC with the previous path, why? and which is the right one?By the way, thank you very much
Amr ElGarhy
I'm not sure why the discrepancy between machines. I'd consider the full path to be preferable, since it accounts for changes in the virtual root of your test server.
Dave Ward
+1  A: 

Just for the record:

After adding the hotfix, and ensuring the the vsdoc has the same name, don't forget to do ctrl shift 'J' to force VS to update the Jquery. You may also find that the VSdoc file has a 2 on the end of the file. On my version this was no longer necessary, so I had to rename my vsdoc2.js to vsdoc.js: ctrl shift 'j' and boom: it works!

NB. With the hotfix, you will only need this on your page:

<script type="text/javascript" src="jsCode\jquery-1.3.2.js"></script>

The vsdoc.js file just needs to sit next to the jquery-1.3.2.js file, it doesn't need a reference, so if you have this:

<script type="text/javascript" src="jsCode\jquery-1.3.2-vsdoc.js"></script>

..as well, you can remove it. It isn't necessary and - I think - cock's things up.

thanks for nice tip, its new for me.
Amr ElGarhy