Quantcast
Channel: Juan's Blog - Visual Studio
Viewing all articles
Browse latest Browse all 7

Intellisense not working on views after migrating MVC application to Visual Studio 2013

$
0
0

 

I recently migrated one of our MVC applications to Visual Studio 2013.

After the migration, Intellisense broke. It would not work for any view I opened. It wouldn't even recognize the @model directive.

Since part of the plan was to upgrade to the latest version of MVC (5 at the time of this writing), I decided to add the NuGet package and its dependencies. This didn't solve the problem either.

Eventually, I ended up creating a new test MVC project with Visual Studio 2013. I then took the pertinent sections from the web.config file under the Views folder and copied them over to my migrated project. I then closed and relaunched VS2012 and the solution.

That got Intellisense working again.

Keep in mind that if you do this, you will introduce some new dependencies, since the latest template uses the System.Web.Optimization namespace. I didn't try removing this namespace from the web.config but if you don't want the dependencies, you might be able to get away with removing it from the web.config.


Viewing all articles
Browse latest Browse all 7

Trending Articles