How do I get JavaScript Intellisense from vsdoc file references in WebMatrix 2 Beta?

时光怂恿深爱的人放手 提交于 2019-12-18 17:31:07

问题


I copied a JavaScript file over from Visual Studio to a new WebMatrix 2 Beta project only to find out the vsdoc file wasn't being used for JavaScript Intellisense.

/// <reference path="jquery-1.6.4-vsdoc.js" />

JavaScript's core functions do show up in Intellisense, but it doesn't appear to pull additional data from vsdoc files.

Spoiler alert: I will be answering this myself to bring the answer from its current webmatrix.uservoice.com location to StackOverflow for anyone else with this issue. Please don't take offense to this.


回答1:


Since they are currently taking user input on desired features in WebMatrix 2 Beta, I pitched support for vsdoc JavaScript file references. The WebMatrix team responded that it was already supported but the syntax was different until they change it to be more consistent with the current Visual Studio syntax. It is only different by one word.

Works in WebMatrix 2 Beta (note "file" instead of "path")

/// <reference file="jquery-1.6.4-vsdoc.js" />

Note:

While the "path" syntax doesn't work in WebMatrix 2 Beta yet, the WebMatrix team seemed intent on supporting it going forward for consistency with Visual Studio. If, for some reason, someone is using the same *vsdoc.js file between a WebMatrix 2 Beta project and a Visual Studio project (or managing a a WebMatrix user's project in Visual Studio), you could simply cover both bases. The WebMatrix "file" syntax does not appear to be supported by Visual Studio 2010.

/// <reference path="jquery-1.6.4-vsdoc.js" />
/// <reference file="jquery-1.6.4-vsdoc.js" />

Additional Note:

WebMatrix 2 Beta does not appear to support the new paragraph-sectioned (<para>) vsdoc files.



来源:https://stackoverflow.com/questions/7742313/how-do-i-get-javascript-intellisense-from-vsdoc-file-references-in-webmatrix-2-b

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!