[Perfect solution] 2017 open the MVC 4 Project, And the cshtml page prompts 'the current context does not have a name model ',

Source: Internet
Author: User

[Perfect solution] 2017 open the MVC 4 Project, And the cshtml page prompts 'the current context does not have a name model ',

Time:

Background: lead to add new features to the previous MVC 4 Project, pull them from GIT, and use VS2017 to open them, all Razor-related code on the cshtml interface is prompted with 'no name XXX exists in the current context 'and no smart prompt is displayed, but compilation and running are not affected.

Solution: the web. config version in the Views folder is incorrect in most cases after a large circle of Baidu. In the afternoon, I decided to ask daxie @ Lao Nong. After instruction, I started the vs2017 repair and found that ASP was selected when we installed vs2017. NET and Web.. NET and Web development. NET MVC4 is not selected, as shown in figure

 

Therefore, an error is reported when you open the cshtml of the MVC 4 project because MVC4 is not installed.

Record the information to help the students quickly solve similar problems.

Thank you @ Lao Nong!

It is helpful to pay more attention to the open-source web framework ZKWEB of Lao Nong. Remember star.

 

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.