开发者

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

开发者 https://www.devze.com 2023-04-12 07:39 出处:网络
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.

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.


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" />

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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号