Question

I just updated my project to MVC 5.1 from MVC 5. The main web.config file got updated automatically, but web.configs under main View and Areas folders weren't changed. I suspect that's why now I lost both intellisense and resharper support for my actions, controllers and areas.

Does anyone know correct web.config content for MVC 5.1 Views? Just replacing 3.0.0.0 to 3.1.0.0 and 5.0.0.0 -> 5.1.0.0 did not solve the issue.

It happens in both Visual Studio 2012 and 2013 Professional.

Was it helpful?

Solution

Found a solution from this MS article:

MVC 5.1 Tooling Support and Razor IntelliSense are Still Broken Even After Installing VS2013 Update 1 RC

Known issue:

If a VS2013 user installed “Microsoft ASP.NET and Web Tools 2013.1 for Visual Studio 2013” before they install VS2013 Update 1 RC, they won’t be able to get MVC 5.1 tooling support that comes with VS2013 Update 1 RC.

Symptom:

MVC 5.1 tooling support and Razor IntelliSense are still broken even after installing VS2013 Update 1 RC.

Workaround:

  1. From "Add/Remove Program", uninstall "Microsoft ASP.NET and Web Tools 2013.1 for Visual Studio 2013"
  2. Repair VS2013 RTM
  3. Install VS2013 update 1 RC if you have not yet installed it. If you have already installed this, you don’t need to reinstall or repair it.
  4. From Web PI, reinstall Microsoft ASP.NET and Web Tools 2013.1 for Visual Studio 2013 or repair Azure SDK 2.2.

OTHER TIPS

Update NuGet Packages

Steps:

  1. Select TOOLS –> NuGet Package Manager –> Package Manager Console. This opens the Package Manager Console pane.
  2. In command prompt, type Update-Package and press Enter.

This command will update the MVC files and activate the intellisense again.

Well if you update to ASP.NET MVC 5.1 RTM without updating Visual Studio 2013, you will not get Visual Studio editor support for syntax highlighting while editing the Razor views. You will need to update Visual Studio 2013 to get this support. So it is not directly connected with IntelliSense or Resharper. But anyway I would try to update VS13 to VS13 Update 1

Update NuGet Packages in Package Manager Console.

Verify the current version of System.web.MVC and update it in the Views/Web.config file and also verify the version in Web.config of Root folder.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top