asp.net-mvc – 如何获取针对Razor View Engine的IntelliSense

只是安装了Microsoft Visual Web Developer 2010,并尝试使用Razor View Engine创建一个MVC应用程序。

当打开一个“.cshtml”文件时,我无法在编辑器中获取语法的颜色,并且未显示智能感知。是否有任何选项我明确需要启用它?

解决方法

更新: Release Candidate终于支持Razor IntelliSense。
Update2: The final release got announced here,它还支持Intellisense for Razor语法。 Woohoo!

以下是新增强的Intellisense和Razor语法突出显示的屏幕快照:

对于MVC3和NuGet的一个很好的概述/介绍,我建议你看看这个PDC10 video

一个答案

不,目前的测试版还没有工作:

Razor intellisense isn’t in today’s
beta. We needed to do a little more
testing (and bug fixing) before we
were ready to distribute it broadly.
It patches a few VS files and so we
need to make sure it is 100% solid
before giving it out broadly.

It will definitely be in the final
release,though,and should be
available for people to install in the
next few weeks.

Thanks,

Scott

取自http://weblogs.asp.net/scottgu/archive/2010/10/06/announcing-nupack-asp-net-mvc-3-beta-and-webmatrix-beta-2.aspx#7624491

相关文章

这篇文章主要讲解了“WPF如何实现带筛选功能的DataGrid”,文...
本篇内容介绍了“基于WPF如何实现3D画廊动画效果”的有关知识...
Some samples are below for ASP.Net web form controls:(fr...
问题描述: 对于未定义为 System.String 的列,唯一有效的值...
最近用到了CalendarExtender,结果不知道为什么发生了错位,...
ASP.NET 2.0 page lifecyle ASP.NET 2.0 event sequence cha...