Visual Studio 2015 jQuery intellisense not working

2019-02-11 03:18发布

So I created a Visual Studio 2015 empty ASP.net Core application and tried to add jQuery using bower, but it isn't picking up the intellisense for jQuery... It is showing a warning saying that "Intellisense was unable to determine an accurate completion list..." JavaScript intellisense is still working just not the usual intellisense I would get after typing $.

I am using jquery 3.1.1 in bower set up and read that I need to downgrade. Is that still the case?

2条回答
Anthone
2楼-- · 2019-02-11 03:35
  1. Close your Visual Studio and restart again to check if it works or not.
  2. If not work, restart your laptop.
  3. If still not work, re-install your Visual Studio.
查看更多
\"骚年 ilove
3楼-- · 2019-02-11 03:45

I'm using VS 2015 and MVC 5 and was having this issue. I tried all the above and nothing worked.

I then when into

Tool -> Options -> JavaScript -> Intellisense -> References

and added the

jquery-1.9.1.intellisense.js

file. Worth mentioning I copied this file from my local project to the C:\Program Files(x86)\Microsoft Visual Studio 14.0\Javascript\References folder

I restarted VS and went back into my view and still didn't have intellisense for jQuery.

Then in my view above my script section I changed my jquery reference from the .min copy to the full and the intellisense started to work right away

查看更多
登录 后发表回答