简体   繁体   English

Visual Studio 中 Jquery 没有智能感知

[英]No intellisense for Jquery in Visual Studio

Even after adding Jquery reference from Solution Explorer, there is no intellisense occurring after the dot(.) mark.即使在解决方案资源管理器中添加 Jquery 参考后,在点 (.) 标记之后也不会发生智能感知。

下面是我的代码片段

No intellisense for Jquery in Visual Studio Visual Studio 中 Jquery 没有智能感知

Please try these steps:请尝试以下步骤:

First , make sure that you have installed JQuery nuget package in your project.首先,确保您在项目中安装了JQuery nuget package

1) disable third party extensions under Extensions menu in case some extensions cause this behavior. 1)禁用扩展菜单下的第三方扩展,以防某些扩展导致此行为。

2) close VS Instance, delete.vs hidden folder(a hidden folder which is in the same directory as the xxx.sln ), bin , obj folder, restart your project and then test again. 2)关闭VS Instance,删除.vs隐藏文件夹(与xxx.sln在同一目录下的隐藏文件夹), binobj文件夹,重新启动项目,然后再次测试。

3) add this on the top of your current page: 3)在您当前页面的顶部添加:

///<reference path="Scripts/jquery-3.5.0.js" />

In addition , if you still face this issue, you could try to create a new web application project and then test whether it is an issue of your current and if it works, you could migrate your old project into your new project.另外,如果您仍然遇到这个问题,您可以尝试创建一个新的 web 应用程序项目,然后测试它是否是您当前的问题,如果有效,您可以将旧项目迁移到新项目中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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