开发者

Have you ever gotten jquery vsdoc file to work with Visual Studio?

开发者 https://www.devze.com 2023-03-03 05:46 出处:网络
I assume the point of the jquery vsdoc file is to provide some form of intellisense for jquery.I have used Visual Studio & jQuery & ASP.NET MVC for a while but I have 开发者_运维问答never once

I assume the point of the jquery vsdoc file is to provide some form of intellisense for jquery. I have used Visual Studio & jQuery & ASP.NET MVC for a while but I have 开发者_运维问答never once seen it work in action. I don't know if: 1) I'm misunderstanding the purpose of the jQuery vsdoc file, 2) it doesn't work when you use jQuery from the Microsoft CDN, 3) Resharper is conflicting (I am using 6 now but it didnt work with 4,5 either) or 4) someother extension I have is causing it to not to work.

My question: is any form of jQuery intellisense possible with Visual Studio 2010, and if so, can you post a screenshot of what it looks like?


Just having the vsdoc file present isn't enough to enable intellisense. You need to reference the file in your page (wrapped in if(false) to prevent the reference from being rendered to the client):

<% if(false) 
{ %>
    <script src="/path/to/vsdoc.js" type="text/javascript"></script>
<% } %>

or at the top of your .js file:

/// <reference path="/path/to/vsdoc.js" />

EDIT: a screenshot:

Have you ever gotten jquery vsdoc file to work with Visual Studio?

Another one:

Have you ever gotten jquery vsdoc file to work with Visual Studio?


Sometimes you'll also (in addition to what Kyle wrote) need to press Ctrl + Shift + J to update javascript intellisense in visual studio

0

精彩评论

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

关注公众号