Visual Studio 2012 asp net mvc 3 project razor vie

2019-02-14 10:30发布

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

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
}

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

So, is this bug?

Thanks

3条回答
够拽才男人
2楼-- · 2019-02-14 10:52

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

Otherwise, VS2012 will load Razor 2.0 in the editor, and the MVC config settings will not be applied.

查看更多
Viruses.
3楼-- · 2019-02-14 11:06

You will have to restart VS 2012 before the change takes effect.

查看更多
Rolldiameter
4楼-- · 2019-02-14 11:10

I tried this solution when I had problem, as well as the one where you modify TExt Editor -> formating -> client tag but neither helped in my case. I started the installer once again after some time and hit the upgrade button. For some reason some of the components were not installed succesfully early on. Afterwards everything started working correctly so check that too :).

查看更多
登录 后发表回答