none
VS2015.3: How can I get JavaScript IntelliSense?

    Question

  • For my customer I'm working on a legacy ASP.NET WebForms project.

    After adding jQuery NuGet package and adding a JavaScript file to the project I don't get any JavaScript IntelliSense whatsoever. All I get is an IntelliSense warning claiming that Intellisense is not able to give a deliberate list of suggestions.

    So, what is necessary to get basic JavaScript Intellisense for strings, HTML DOM etc.? And how do I get jQuery Intellisense? There is a jquery-****.intellisense.js file available but it isn't used even if I add a /// <reference path="..."/> node to my JavaScript file.



    Still people out there alive using the keyboard?

    Working with SQL Server/Office and their poor keyboard support they seem extinct...

    • Edited by BetterToday Thursday, September 15, 2016 11:52 AM
    Thursday, September 15, 2016 11:47 AM

Answers

  • Hi BetterToday,

    >> All I get is an IntelliSense warning claiming that Intellisense is not able to give a deliberate list of suggestions.

    Could you provide a screenshot about what do you type and how the warning message shows? It can help us understanding your issue clearly.

    According to your description, you installed JQuery in your ASP.NET WebForm application and want to use the JQuery functions in your custom Javascript file, is it right?

    Please check your custom Javascript file in the same folder with the JQuery files. And then please reference the jquery-3.1.0.js file into your custom Javascript file. Then when I type "$(document)." it will prompt all functions that in JQuery.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, September 16, 2016 8:23 AM
    Moderator

All replies

  • Hi BetterToday,

    >> All I get is an IntelliSense warning claiming that Intellisense is not able to give a deliberate list of suggestions.

    Could you provide a screenshot about what do you type and how the warning message shows? It can help us understanding your issue clearly.

    According to your description, you installed JQuery in your ASP.NET WebForm application and want to use the JQuery functions in your custom Javascript file, is it right?

    Please check your custom Javascript file in the same folder with the JQuery files. And then please reference the jquery-3.1.0.js file into your custom Javascript file. Then when I type "$(document)." it will prompt all functions that in JQuery.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, September 16, 2016 8:23 AM
    Moderator
  • That's perfectly working. Excellent! Thanks, Weiwei!

    Yet, I got one question:

    The IntelliSense information is not stored in the jquery-3.1.0.js file, it's stored in the jquery-3.1.0.intellisense.js file. However, the only reference working in Visual Studio is to reference "jquery-3.1.0.js".

    So, basically, what mechanism is used here? Why do i need to reference "jquery-3.1.0.js" when the information is stored in another file? Where is this behaviour documented? What's the reasoning behind it?


    Still people out there alive using the keyboard?

    Working with SQL Server/Office and their poor keyboard support they seem extinct...

    • Edited by BetterToday Tuesday, September 20, 2016 9:09 AM
    Tuesday, September 20, 2016 9:09 AM
  • Hi BetterToday,

    I'm glad that your problem has been resolve. Please mark the helpful reply as answer which is benefit to other communities who has the same issue.

    I think the jquery.intellisense.js file store the intellisense information, but the intellisense information are invoked by the jquery.js file. So we need to reference the file into the javascript file that you want to use them.

    Following document introduce the Javascript IntelliSense, hope it can help you.

    https://msdn.microsoft.com/en-us/library/bb385682.aspx

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, September 20, 2016 9:47 AM
    Moderator