[英]javascript intellisense in Visual Studio
or you can simply drag and drop your javascript into your .js file and it creates entry like this: 或者您只需将您的javascript拖放到.js文件中,它就会创建如下条目:
/// <reference path="jquery-1.6.2.js" />
worked fine on my VS 2010 (Premium version) 在我的VS 2010(高级版)上运行良好
I'm using VS2010 with ReSharper 6 which adds powerful JS Intellisense support. 我正在使用VS2010和ReSharper 6 ,它增加了强大的JS Intellisense支持。 Autocomplete works for all JS files in the solution as well as jQuery. 自动完成适用于解决方案中的所有JS文件以及jQuery。 But it's not free. 但它不是免费的。
Go to Tools-Options-Text Editor-Javascript-Intellisense-References and place a reference to the intellisense files for the version of jquery you are using in the Implicit Web group. 转到Tools-Options-Text Editor-Javascript-Intellisense-References,并为您在Implicit Web组中使用的jquery版本的intellisense文件添加引用。
OR 要么
place an "add reference" to the intellisense file in the _references.js file which you can add to the Scripts folder of your project. 在_references.js文件中的intellisense文件中添加“添加引用”,您可以将其添加到项目的Scripts文件夹中。
/// <reference path="jquery-1.8.2.js"/>
/// <reference path="jquery-1.8.2.min.js"/>
/// <reference path="jquery-1.8.2.intellisense.js"/>
Though this will only provide intellisense for the project you are in, the first will for any open js file. 虽然这只会为您所在的项目提供智能感知,但对于任何打开的js文件都是第一个。
To get the latest jquery files with intellisense use the nuget package installer which by default will create a scripts folder and place the jquery version.js, the min.js and intellisense.js files into... from there you can copy them to the location most of the Microsoft references are placed which is typically 要使用intellisense获取最新的jquery文件,请使用nuget软件包安装程序,默认情况下将创建一个脚本文件夹,并将jquery version.js,min.js和intellisense.js文件放入...中,您可以将它们复制到位置通常是放置大多数Microsoft引用
C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\JavaScript\\References C:\\ Program Files(x86)\\ Microsoft Visual Studio 11.0 \\ JavaScript \\ References
http://archive.msdn.microsoft.com/KB958502/Release/ProjectReleases.aspx?ReleaseId=1736 http://archive.msdn.microsoft.com/KB958502/Release/ProjectReleases.aspx?ReleaseId=1736
Wow... I followed the method described above.. Awesome.... 哇...我按照上面描述的方法。真棒....
You should get the jQuery files from Asp.Net CDN. 你应该从Asp.Net CDN获取jQuery文件。 They have VSDOC and are able to give very good intellisense and documentation support. 他们有VSDOC,能够提供非常好的智能感知和文档支持。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.