Razor Intellisense 不工作 VS2010 SP1Rel MVC3 来自 WPI Win7 x64 [英] Razor Intellisense Not Working VS2010 SP1Rel MVC3 from WPI Win7 x64

查看:16
本文介绍了Razor Intellisense 不工作 VS2010 SP1Rel MVC3 来自 WPI Win7 x64的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一台全新安装了 Windows 7 64 位专业版的机器上安装了 Visual Studio 2010/SP1/MVC 3(带有四月工具更新).

I have Visual Studio 2010 /SP1 / MVC 3 (With April Tools Update) installed on a machine with a fresh install of Windows 7 64-bit Professional.

我没有安装 resharper.我从来没有在这个新的操作系统安装上安装过任何东西的 RC 或 Beta.

I do not have resharper installed. I never installed an RC or Beta of anything on this new OS Install.

我的安装步骤如下:

  1. 安装 Visual Studio Professional.
  2. 安装 Web 平台安装程序.
  3. 从 WPI 安装 Visual Studio SP1.
  4. 安装 Microsoft ASP.net MVC 3(带有四月工具更新)
  5. 安装生产力电动工具

帮助 > 关于 Microsoft Visual Studio 显示:

Help > About Microsoft Visual Studio shows:

微软 Visual Studio 2010版本 10.0.40219.1 SP1Rel

Microsoft Visual Studio 2010 Version 10.0.40219.1 SP1Rel

微软.NET框架版本 4.0.30319 SP1Rel

Microsoft .NET Framework Version 4.0.30319 SP1Rel

System.Web.Mvc.dll 文件版本显示:3.0.20105.0

System.Web.Mvc.dll file version shows: 3.0.20105.0

安装后,我执行了以下操作:

Once installed I did the following:

  1. 打开 Visual Studio.
  2. 文件 > 新建项目
  3. 选择ASP.Net MVC 3 Web 应用程序".
  4. 在新建 ASP.NET MVC 3 项目"对话框中.我选择了Internet 应用程序"、Razor"视图引擎.点击确定.

这里是项目中的行为:

  1. 打开任何 cshtml 文件,Razor @blocks 都不会突出显示.
  2. Intellisense 提供 html 片段作为剃刀块内外的选项,但无法识别其中的 Html 帮助程序或模型等.
  3. 项目构建.
  4. 您可以运行项目,构建后一切正常.Razor 视图正常呈现.

有人知道 Razor Intellisense 工作的明确先决条件吗?我可以在具有 Razor Intellisense 工作的其他 Win7 64 位机器和有此问题的 2 台机器之间进行区分吗?注册表项?是否有任何 Visual Studio 日志可以帮助调试?经过数小时的挫折和阅读我遇到的每一个 Razor Intellisense 帖子和问题后,我没有想出任何有效的方法,我只是希望对接下来要排除故障/尝试的内容有一些新的想法.

Does anyone know a definitive set of prerequisites to have Razor Intellisense working? Something I can diff between the other Win7 64-bit machines that have Razor Intellisense working and the 2 that have this issue? Registry entries? Are there any Visual Studio logs that can help debug this? After hours of frustration and reading every Razor Intellisense post and question I have run across without coming up with anything that works I am just hoping for some new thoughts on what to troubleshoot/try next.

感谢您对此的任何帮助.

Thanks for any help on this.

推荐答案

我知道距离上一篇博文已经有一段时间了,但我通过卸载 MVC 2 和 MVC2 VS Tools 修复了我的问题,并且只安装了 MVC 3.

I know it's been a while since the last post, but I fixed mine by uninstalling MVC 2 and MVC2 VS Tools, and only leaving MVC 3 installed.

这篇关于Razor Intellisense 不工作 VS2010 SP1Rel MVC3 来自 WPI Win7 x64的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆