I created a new test.js file in the project node of my web part solution with VS 2010 and included the references:

/// <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" />

I then proceeded to write a basic test.

function test() {

I stopped at the letter i. I was hoping IntelliSense would prompt me with ClientContext and help me along. This does not happen. Is this by design? I am following Microsoft procedures here for stand alone .js files. http://msdn.microsoft.com/en-us/library/ff798328.aspx

2 Answers 2


Did you update the JavaScript Intellisense by pressing Ctrl+Shift+J ? Restarting Visual Studio should also help.

  • Yes, I tried that. I should be more clear. IntelliSense is popping up, but doesn't offer what I expect. ClientContext is not in the list of options. Thanks.
    – Sean
    Jul 12, 2012 at 15:03

The problem is that the path to MicrosoftAjax.js was incorrect. It turns out that the Ajax tools were buried in a few places under C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7... Perform a search for the file and then copy it to the LAYOUTS directory with the others. Then perform Ctrl+Shift+J to refresh the library.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.