I am working on an MVC 5 application and it was running perfectly fine before I started using the Pager from PagedList.Mvc. After I used this Pager, the application works fine on the development server but when I publish it to the file system and deploy it on another server, it gives me the following error:
Could not load file or assembly System.Web.Mvc Version 4.0.0.0
Please help me resolve this error.
That's probably because PagedList.Mvc is compiled against System.Web.Mvc Version 4.0.0.0.
Try using bindingRedirect:
Just update line
<bindingRedirect oldVersion="0.0.0.0-4.0.0.1" newVersion="5.2.3.0"/>
with your proper versions.