Jatin
Jatin

Reputation: 4063

Getting MVC 3 razor view intellisense to work with Visual Studio 2013

I am facing the same issue sited here. Basically, the MVC3 razor view (cshtml) intellisense does not work with VS 2013. The reason sited on that thread is that MVC3 is not supported in VS 2013. Now I have a third party library (dll) that I cannot upgrade to MVC4 or MVC5 without incurring additional cost. I am doubtful whether the MVC3 version of that library that I am currently using will correctly work with MVC4 if I upgrade my VS 2013 project to MVC4 for intellisense.

Coming back to my question, is there any way to get the VS 2013 razor view intellisense working for MVC3 . Other than intellisense, there is no issue and the project compiles and runs without any problems.

EDIT

As can be seen from the snapshot below, intellisense works for some statements like @Html.Label(..) but not for @Html.DisplayFor(..), Html.TextAreaFor(..) and others.enter image description here

Upvotes: 3

Views: 832

Answers (1)

SergeyT
SergeyT

Reputation: 850

Add these two lines inside each view:

@inherits System.Web.Mvc.WebViewPage<dynamic>
@using System.Web.Mvc.Html

Instead of dynamic put your Model's type name.

Upvotes: 4

Related Questions