If you’re creating or editing a JavaScript file in Visual Studio and you would like some help creating Client Object Model code, you’re not alone.
It’s a little bit cryptic, but we can tell IntelliSense to include any JavaScript libraries you have on your development machine.
Simply place the following two lines at the top of your source code (watch out for line breaks!):
/// <reference path="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\MicrosoftAjax.js" /> /// <reference path="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\SP.debug.js" /> /// <reference path="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\SP.Core.debug.js" />
Then, you can get IntelliSense when you need it the most!
Full article on MSDN available here.
Enjoy!
You can leave a response, or trackback from your own site.



This doesn’t seem to include properties from the client Context object such as clientCtx.load(), or clientCtx.executeQueryAsync().
Which js file should be included for those little buggers?
Ahhh. I’d missed off SP.Core.debug.js :) try now!
joel
You are also missing a space between Server and Extensions:
///
Put in the space and it works.
Janus, many thanks for reading, and many thanks for spotting my typo! I had a missingspace in one of the two includes. You’re a complete star!. :o)
I’ve corrected it and hopefully now this should work for everyone :)
Cheers!
joel