如何使用 jQuery NuGet 包 1.8.0 附带的 intellisense.js 文件而不是 vsdoc.js?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12010106/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to use intellisense.js file that came with jQuery NuGet package 1.8.0 instead of vsdoc.js?
提问by Soul_Master
I just found that the lastest version (1.8.0) of jQuery NuGet package include the new type of vsdoc file that I cannot find any documentation. The intellisense file just only include xml comment-based document of jQuery library. I don't sure how to use this file.
我刚刚发现 jQuery NuGet 包的最新版本 (1.8.0) 包含我找不到任何文档的新型 vsdoc 文件。智能感知文件只包含 jQuery 库的基于 xml 注释的文档。我不知道如何使用这个文件。
Do you have any idea or document about this? I use VS2012 for this project.
您对此有任何想法或文件吗?我在这个项目中使用 VS2012。
采纳答案by Soul_Master
In JavaScript file, the JavaScript language service provides IntelliSense features for third-party JavaScript libraries that are added to a project. For most libraries, statement completion is provided automatically by the language service. The following illustration shows an example of statement completion:
在 JavaScript 文件中,JavaScript 语言服务为添加到项目中的第三方 JavaScript 库提供 IntelliSense 功能。对于大多数库,语句完成是由语言服务自动提供的。下图显示了语句完成的示例:
In Visual Studio 2012, Visual Studio will automatically find ".intellisense.js" file and use it like old vsdoc file without writing real JavaScript structure.
在 Visual Studio 2012 中,Visual Studio 会自动找到“.intellisense.js”文件并像旧的 vsdoc 文件一样使用它,而无需编写真正的 JavaScript 结构。
For additional information, please look at the following link.
有关其他信息,请查看以下链接。
回答by 1AmirJalali
you don't need to do anything. you just need to install or update jquery package from nuget by using
你不需要做任何事情。您只需要使用 nuget 安装或更新 jquery 包
Install-Package jQuery
or
或者
Update-Package jQuery
and then the intellisense and documentation is available everywhere.
然后智能感知和文档随处可用。
you don't need vsdoc anymore because the new file jquery-1.8.0.intellisense is more organized.
您不再需要 vsdoc,因为新文件 jquery-1.8.0.intellisense 更有条理。
There is also a great video by Scott Hanselman at the following url which shows the new features of JavaScript editor in visual studio 2012 http://www.asp.net/vnext/overview/videos/visual-studio-2012-javascript-editor
Scott Hanselman 在以下网址还有一个很棒的视频,其中展示了 Visual Studio 2012 中 JavaScript 编辑器的新功能http://www.asp.net/vnext/overview/videos/visual-studio-2012-javascript-editor