locked
JavaScript intellisense stopped working

    Question

  • I'm on VS12/Win7. Full config listed below. The intellisense for JS worked perfectly in the beginning. It also worked for a while after i have added jQueryxxx.file. Then it stopped and i only get the message:

    "intellisense was unable to determine an accurate completion list for this expression, The provided list contains all identifiers in the file"

    Now it doesn't work for jQuery AND it doesn't work for normal JS either.

    I have followed the thread listed below but i got into some hick-ups.

    http://social.msdn.microsoft.com/Forums/en-US/toolsforwinapps/thread/4678f71c-bbc3-47d8-805e-c73b66b8315a

    1. domWindows is where the reference in Options says it should be.

    2. The registry key i don't see. In fact, in VisualStudio i only see two directories: DataProject and SQLDB. Nothing about JavaScriptLanguageService.

    3. The output in JavaScriptLanguageService is empty. Says nothing.

    The only change i can think of was that i first put in jQuery-1.7.2.js directly in the root of my project and after a while moved it to ~/scripts. Copying it back where it was originally doesn't solved the problem.

    What on earth can have caused it and how do i kill it?

    Microsoft Visual Studio Express 2012 RC for Web
    Version 11.0.50522.1 RCREL
    Microsoft .NET Framework
    Version 4.5.50501

    Installed Version: WD Express

    Microsoft Visual Basic 2012 RC   04310-004-0009005-02938
    Microsoft Visual Basic 2012 RC

    Microsoft Visual C# 2012 RC   04310-004-0009005-02938
    Microsoft Visual C# 2012 RC

    Microsoft Visual Studio 2012 Team Explorer RC   04310-004-0009005-02938
    Microsoft Visual Studio 2012 Team Explorer RC

    Microsoft Visual Web Developer 2012 RC   04310-004-0009005-02938
    Microsoft Visual Web Developer 2012 RC

    Microsoft SQL Server Data Tools   11.1.20425.00
    Microsoft SQL Server Data Tools

    NuGet Package Manager   1.8.30423.9026
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

    Web Tooling Extensions RC   1.0.30628.0
    Page Inspector: Tool that offers an efficient way to decompose Web Applications and diagnose front-end issues.
    Web Publishing: Extensions required for Web Publishing for both hosted servers as well as on premises.
    Web Form Templates: Includes the default templates for Web Form Applications.
    Editor Extensions: Includes HTML, CSS, and JS editor extensions that greatly enhance the development experience.

    Windows Azure Tools   June 2012
    Windows Azure Tools for Microsoft Visual Studio 2012 - June 2012 v1.7.50517.1601

    Friday, July 13, 2012 11:58 PM

Answers

  • I think if this is a web application, updating the references under Scripts/_references.js to include:  /// <reference path="jquery-1.7.2.js" /> should fix it.

    That is if you put it under Scripts/jquery-1.7.2.js.  If you put it somewhere else you should be able to use path syntax (ie ../ to get to the root).

    You can also give jQuery IntelliSense to which ever file you need by adding the reference tag to the file (You can also drag and drop the jQuery file onto the JavaScript file to generate the tag for you).


    This posting is provided "as is" with no warranties, and confers no rights.

    Tuesday, July 17, 2012 12:10 AM

All replies

  • Since this is a web project the options will be under: Tools | Options | Text Editor | JavaScript | IntelliSense | References , then select "Implicit (Web)" under Reference Group.

    The registry key will also be under: HKEY_CURRENT_USER\Software\Microsoft\VWDExpress\11.0\JavaScriptLanguageService\ReferenceGroupsRC

    Does IntelliSense not work for this project only?  If you made a new project does JQuery work there?


    This posting is provided "as is" with no warranties, and confers no rights.

    Monday, July 16, 2012 10:08 PM
  • Ok, thanks for the reply. I've found the key in the registry and it's value is as follows:

    Implicit (Windows)|C:\Program Files (x86)\Microsoft Visual Studio 11.0\JavaScript\References\libhelp.js|C:\Program Files (x86)\Microsoft Visual Studio 11.0\JavaScript\References\sitetypesWindows.js|C:\Program Files (x86)\Microsoft Visual Studio 11.0\JavaScript\References\domWindows.js|C:\Program Files (x86)\Microsoft Visual Studio 11.0\JavaScript\References\underscorefilter.js|C:\Program Files (x86)\Microsoft Visual Studio 11.0\JavaScript\References\showPlainComments.js|C:\Program Files (x86)\Microsoft Visual Studio 11.0\JavaScript\References\jquery.intellisense.js;Implicit (Web)|C:\Program Files (x86)\Microsoft Visual Studio 11.0\JavaScript\References\libhelp.js|C:\Program Files (x86)\Microsoft Visual Studio 11.0\JavaScript\References\sitetypesWeb.js|C:\Program Files (x86)\Microsoft Visual Studio 11.0\JavaScript\References\domWeb.js|C:\Program Files (x86)\Microsoft Visual Studio 11.0\JavaScript\References\underscorefilter.js|C:\Program Files (x86)\Microsoft Visual Studio 11.0\JavaScript\References\showPlainComments.js|~/Scripts/_references.js;Dedicated Worker|C:\Program Files (x86)\Microsoft Visual Studio 11.0\JavaScript\References\libhelp.js|C:\Program Files (x86)\Microsoft Visual Studio 11.0\JavaScript\References\dedicatedworker.js|C:\Program Files (x86)\Microsoft Visual Studio 11.0\JavaScript\References\underscorefilter.js|C:\Program Files (x86)\Microsoft Visual Studio 11.0\JavaScript\References\showPlainComments.js;

    So, i guess it's like it's supposed to. Also, i noticed that JavaScript intellisense seems to be working now. So the only issue remaining is that intellisense for jQuery isn't there.

    What do i do about it? I could try to reference the file itself (jquery-1.7.2.js) but i'm unsure if that's the right way to go. Please advise. (Same behavior in both the current and the new project.)

    Monday, July 16, 2012 10:33 PM
  • I think if this is a web application, updating the references under Scripts/_references.js to include:  /// <reference path="jquery-1.7.2.js" /> should fix it.

    That is if you put it under Scripts/jquery-1.7.2.js.  If you put it somewhere else you should be able to use path syntax (ie ../ to get to the root).

    You can also give jQuery IntelliSense to which ever file you need by adding the reference tag to the file (You can also drag and drop the jQuery file onto the JavaScript file to generate the tag for you).


    This posting is provided "as is" with no warranties, and confers no rights.

    Tuesday, July 17, 2012 12:10 AM