CS0234: Mvc does not exist in the System.Web namespace

前端 未结 8 1579
醉梦人生
醉梦人生 2020-12-01 08:57

I converted a ASP.net 4 webform project to Asp.net MVC4 according to Chapter 13 of the Professional ASP.NET 3.5 MVC, by Scott Hanselmen, Phil Haack, and Rob Conery, Publishe

8条回答
  •  一向
    一向 (楼主)
    2020-12-01 09:37

    I had the same problem and I had solved it with:

    1.Right click to solution and click 'Clean Solution'

    2.Click 'References' folder in solution explorer and select the problem reference (in your case it seems System.Web.Mvc) and then right click and click 'Properties'.

    3.In the properties window, make sure that the 'Copy Local' property is set to 'True'

    This worked for me. Hope it works for someone else

    Helpful Note: As it has mentioned in comments by @Vlad:

    If it is already set to True:

    1. Set it False
    2. Set it True again
    3. Rebuild

提交回复
热议问题