C # project, right-clicking on the Controller folder does not have "add controller" issue

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.