Intelliesense Limited in VS2013 by MVC3 Project

I recently installed vs 2013 professional and opened one of my project projects in it. The project is an MVC3 application using a razor viewer mechanism. I noticed that when editing the view (cshtml) I did not get access to intellisense, which I was used to in 2012. 2 I immediately noticed that there were @ Url.Content () and @Viewbag. The code is still compiling and running, just no intellisense. After messing with him a little, I realized that I had to check the update log and, of course, found ...

"Intellisense for Razor files (CSHTML and VBHTML) are limited to HTML markup. See the http://go.microsoft.com/fwlink/?LinkID=317645 MVC 3 project for more information.

The link provided says that you should switch from mvc3 to mvc4. My question is: is this my only option? To use VS2013 for old mvc3 projects, will I have to update all of them or will vs2013 support full intellisense in mvc razor files?

+18
c # visual-studio-2013 asp.net-mvc razor intellisense
Oct 24 '13 at 13:23
source share
4 answers

Found here ...

Soon you will see the new version of MVC5 in VS2013. MVC5 will be included in VS2013. MVC3 is not supported in VS2013. I confirmed it on channel9 last time. This way, people who only installed VS2013 or do not have the old version will get problems with a project that is still in MVC3. This error occurs because installing MVC4 and 5 does not contain the DLL used in ASP.NET MVC version 3.

http://geekswithblogs.net/anirugu/archive/2013/10/16/how-to-migrate-asp.net-mvc-3--mvc4-project-to.aspx

The project upgrade to MVC 5 has finished ... I created a new project and transferred all the contents of my model, view and controller folders. It was also necessary to update webconfig to include some packages that I installed in a previous project.

+19
Oct 25 '13 at 14:03
source share

Add these two lines inside each view:

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

and intellisense will work again for MVC3 in VS2013

+13
Feb 26 '15 at 21:39
source share

You can try Reloading the project from the solution browser and reloading it again. See if you can return your intellisense. It worked for me.

+3
Nov 28 '13 at 5:09
source share

1- From the tools, select the Nuget package manager console 2- download system.web.mvc 3 using this PM> Microsoft.AspNet.Mvc installation package -Version 3.0.20105.1

0
Feb 13 '17 at 22:10
source share



All Articles