When I'm using the Google CDN to acquire the jQuery library, how do I then reference the companion Microsoft CDN VSDOC file to get IntelliSense support in VS 2010?
So far in documentation I've run across instructions to put the VSDOC file alongside the script file in the same folder (in the website) and abide by the naming convention.
e.g.
/scripts/jquery-1.6.2-vsdoc.js
/scripts/jquery-1.6.2.js
However my files aren't on disk. Can I gain IntelliSense over the network without downloading these files?
jQuery VS Doc location at Microsoft CDN:http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.2-vsdoc.js
JQuery from Google CDN (with Google API key not shown):
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"
type="text/javascript">
</script>
Yes, as long as the CDN has the -VSDOC file in the same location. Microsoft's CDN does, so just reference the js file from the CDN like this:
<!-- language-all: lang-html -->
<html>
<head>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js"></script>
...
</head>
<body>...</body>
</html>
Note: VS 2008 SP1 does not support this, so don't tear your hair out trying to get it to work!
Source: http://www.asp.net/ajaxlibrary/jquery_intellisense.ashx jump down to the section "Visual Studio 2010, IntelliSense and the CDN".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With