1, found the copy of the project, in the Controller folder right-click on the mouse can not have "add controller" this item, the controllers inside the right-click Controller name also has no "add view", so that the controller and view are handwritten, development efficiency is low.
2, the reason is the MVC package problem, the solution is: first uninstall the MVC package, then install again, and then restart vs.
Specific steps:
1) on the "References" of your Web project, such as "References", right click, click "Manage NuGet Packages".
2) in the popup screen below, locate the item and click "Uninstall".
3) Install this when you are finished uninstalling.
4) In general, the above steps can be completed, restart the project, the problem can be solved.
5) Your own questions:
In the second step, after clicking "Uninstall", pop up the following block diagram and click "No".
Problems can occur later, as shown in
Workaround: In "Update", Look for "Microsoft.AspNet.WebPages", click "Update". (Updated from 3.0.0 to 3.2.3 version)
This way, you can then proceed to the 3rd step, and you can install it successfully. Restart the project, the problem is solved!
C # project, right-clicking on the Controller folder does not have "add controller" issue