Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 "Not Responding" when adding an MVC controller or view

We are attempting to add MVC to an old, large, legacy webforms app. (The intent is to gradually re-implement portions of the app using MVC until the old app is gone).

Setting it up has gone smoothly. We have an MVC Area, and I created a controller which is accessible when running the app, by means on directly typing the url.

But whenever we "Add > Controller" or "Add > View"... Visual Studio hangs for around 10 minutes "Not Responding".

Clearly there is some bug in visual studio interacting with some quirk in our legacy project.

Googling, I have so far found only a few similar cases that are old & do not seem applicable.

Not sure where to begin resolving this.

UPDATE:

For what it is worth, we have converted the original VB webforms project to C#. I then added MVC Nuget package and and MVC area. Visual studio no longer seems to hang when adding controllers. So this might be a VB specific thing. Or maybe some windows update to visual studio fixed this in the interim since i posted this. Not sure.

like image 537
Greylander Avatar asked Aug 20 '15 19:08

Greylander


1 Answers

The problem is still present in Visual Studio 2015 Update 1.

As a workaround, instead of selecting "Add View" you can select "New Item" and choose a page template from Web/MVC instead.

like image 131
jonny Avatar answered Sep 22 '22 15:09

jonny