MVC 5 -> MVC 5.1 Migration. Intellisense issues

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.

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

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.

Method 2

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.

Method 3

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

Method 4

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.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x