You need use the NuGet command line in the Package Manager Console:
Update-Package -reinstall
to force reinstall the package references into project.
NuGet Restore only restores files in the packages directory (packages folder ), but does not restore files inside your project or otherwise modify your project.
For example, if a package has added some reference DLLs or other files in your project, if you delete any of these files, they will not be re-added when restoring this package. This may cause the your project to not be able to find the missing dependencies when building.
So use the "Update-Package -reinstall" command to force reinstall the package references and content files into project.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…