jQuery intellisense does not work in Visual Studio

If you use jQuery with its vsdoc file in Visual Studio 2008, you might have noticed that sometimes when adding certain JavaScript files, like jQuery.UI, it knocks out your Visual Studio intellisense.

Here is a dead simple way to fix it.

1. First find the offending library that is messing with your jQuery IntelliSense. Do this by commenting one at a time and pressing Ctrl + Shift + J to force the JS IntelliSense engine to regen. Repeat until you don’t get a JS IntelliSense error (it should come up in the status bar, and as a warning in the errors window)

2. Replace the offending javascript file with something like this.

<script src=’<%= “../../Scripts/your_javascript_file.js” %>’ type=”text/javascript”>

When you do this, the Visual Studio JS intellisense engine, does not try to process  the javascript file, and you get your jQuery IntelliSense back.

Hope this helps. Cheers!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.