ASP.Net MVC 3 Razor评论打破了jQuery intellisense

时间:2012-03-04 20:32:30

标签: jquery razor intellisense

似乎Razor或MVC中都存在错误。给出以下代码:

@* This is necessary to get the jQuery intellisense.  It won't be rendered to the HTML *@
@if (false) { <script src="../../Scripts/jquery-1.7.1-vsdoc.js" type="text/javascript"></script> }

<script>
$().   <- This has intellisense

@* Comment *@
$().   <- This does not have intellisense
</script>

正如您所看到的,Razor评论之后的任何内容都没有jQuery intellisense。在VS2010的错误窗口中,我收到消息“Javascript智能感知消息:C:\ Src \ CSUService \ CSUService \ Scripts \ jquery-1.7.1-vsdoc.js(68:48):'rootjQuery'未定义”

有人知道解决这个问题吗?

0 个答案:

没有答案