Visual Studio 2012 ASP.NET MVC 3项目剃刀视图 [英] Visual Studio 2012 asp net mvc 3 project razor view

查看:105
本文介绍了Visual Studio 2012 ASP.NET MVC 3项目剃刀视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在新的Visual Studio 2012 RC的asp net mvc 3项目中遇到了智能感知问题.

I have problem with intellisense in my asp net mvc 3 project in new visual studio 2012 RC.

如果我在VS2012中打开VS2010 SP1 asp net mvc项目,则cshtml视图如下所示:

If I open VS2010 SP1 asp net mvc project in VS2012, cshtml view like this one :

@model Intranet.Web.ViewModels.Login.LoginVM           
@{
    Model.  // dynamic expression - This operation will be resolved at runtime
}

我的配置:Windows 8 x86(x64也会失败),安装了VS 2012和2010SP1.

My configuration : Windows 8 x86(x64 fail too), VS 2012 and 2010SP1 installed.

那么,这个错误吗?

谢谢

推荐答案

在Web.config中将<add key="webpages:Version" value="1.0" />添加到<appSettings>.

Add <add key="webpages:Version" value="1.0" /> to <appSettings> in Web.config.

否则, VS2012将在编辑器和MVC配置中加载Razor 2.0设置将不会应用.

这篇关于Visual Studio 2012 ASP.NET MVC 3项目剃刀视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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