Can't use PagedList.Mvc in MVC 3, Visual Studio 2010

后端 未结 1 1866
南方客
南方客 2021-01-14 02:13

I\'m building a MVC 3 web using Visual Studio 2010. I want to paging data, so I use PagedList. It works well. Now, I need to create a navigation between pages, I use PagedLi

相关标签:
1条回答
  • 2021-01-14 03:03

    It seems that the NuGet you installed requires Razor 2.0 which comes with ASP.NET MVC 4.0. ASP.NET MVC 3 uses Razor 1.0. So make sure you install a version of the PagedList.Mvc NuGet that is compatible with ASP.NET MVC 3.0. For example you could use the 3.18.0.0 version which is compatible with Razor 1.0.

    To force a specific version to be installed for a given Nuget instead of using the latest one you could type the following command in your NuGet console:

    Install-Package PagedList.Mvc -Version 3.18.0.0
    
    0 讨论(0)
提交回复
热议问题