Namespace not found in MVC 3 Razor view

后端 未结 9 1173
情话喂你
情话喂你 2021-01-04 20:29

I am adding a PagedList to my view and loosely following this Tutorial. I have installed the PagedList reference using Nuget, set up my controller as follows



        
9条回答
  •  悲哀的现实
    2021-01-04 21:24

    First sorry for my terrible English. In my case, I use the MVC5 in Visual Studio Community 2015 and I solved the problem this way:

    First I delete the cache of Visual Studio and NuGet cache:

    • Visual studio - go to %LocalAppData% \Microsoft\WebsiteCache and delete all folder.
    • Nuget - here

    After I use the package manager console to remove PagedList.MVC, then remove PagedList and then re-install them again like so:

    • uninstall-package PagedList.mvc
    • uninstall-package PagedList
    • install-package PagedList
    • install-package PagedList.mvc

    I holpe that help

提交回复
热议问题