简体   繁体   中英

Issue in Nuget packages from projects opened from source control

I'm developing a project opened from source control. I have a local copy to edit and I'm committing my changes in the server where the project is saved. I've also installed PagedList.Mvc Nuget package. Right now I tried to create a new project from the same source control from the same PC, but my import from PagedList.Mvc is having errors. I'm currently getting this:

The type or namespace name 'PagedList' could not be found (are you missing a using directive or an assembly reference?)

I can use my old project to commit whatever changes and new files PagedList.MVC generated there but I'm not sure if it has multiple files, I've only committed the .css file. I tried installing the said Nuget package but it says it already exists. How do I fix this?

Restoring NuGet package PagedList.Mvc.4.5.0. Restoring NuGet package PagedList.1.17.0. Adding package 'PagedList.Mvc.4.5.0' to folder 'C:\\Users\\Admin\\Documents\\Visual Studio 2015\\Projects\\TestProject\\packages' Adding package 'PagedList.1.17.0' to folder 'C:\\Users\\Admin\\Documents\\Visual Studio 2015\\Projects\\TestProject\\packages' Added package 'PagedList.Mvc.4.5.0' to folder 'C:\\Users\\Admin\\Documents\\Visual Studio 2015\\Projects\\TestProject\\packages' Added package 'PagedList.1.17.0' to folder 'C:\\Users\\Admin\\Documents\\Visual Studio 2015\\Projects\\TestProject\\packages' Package 'PagedList.Mvc.4.5.0' already exists in project 'TestProject'

(1) Please clean and rebuild the whole solution, run it again.

(2) Please make sure that you really add the reference in your solution explorer window for this project, and the folder for this reference is really existing.

Reference:

PagedList package installed, "missing assembly reference" error in controller

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM