简体   繁体   中英

Visual Studio - Javascript Intellisense?

EDIT: The duplicate question does not address my issue. I have done everything specified there but JS Intellisense is not working. I have all four files in the script references directory ( jquery-2.1.4.js , jquery-2.1.4.min.js , jquery-2.1.4.min.map , and jquery-2.1.4.intellisense.js ) and I've added the global reference to jquery-2.1.4.js , but Intellisense does not work. I do not have a _references.js file.

I've been using Visual Studio for about nine months now and I just discovered on another site that VS has Javascript Intellisense support. I cannot figure out how to enable it, however; I've never had it. VS always says Intellisense was unable to determine an accurate completion list for this expression. The provided list contains all identifiers in the file. Intellisense was unable to determine an accurate completion list for this expression. The provided list contains all identifiers in the file. , I've just ignored it. I have a file in ~/Scripts called jquery-2.1.4.intellisense.js , it's always been there, but I've never had Intellisense.

How do I enable Javascript Intellisense in VS? Does it support standard Javascript or only packages I add (such as jQuery)? I'm using Visual Studio 2015 Professional.

I was adding the jQuery references to the Implicit (Windows) section of the References tab in Options. I switched to Implicit (Web) and added jQuery there, the problem is resolved.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM