当我尝试编译我的程序时,出现以下错误:
This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567.
现在,当我右键单击解决方案并按
All packages are already installed and there is nothing to restore.
我尝试手动重新安装每个没有解决问题的包,我尝试重新安装 NuGet 但这也没有帮助,我什至尝试重新安装 visual studio。
我还尝试将包文件夹从 tfs 文件夹中移出以覆盖我的包文件夹,但这并没有解决任何问题。我也试过在缺少这个包的情况下重新下载它们,这也没有解决问题。
有人知道如何恢复 nuget 包吗?
最佳答案
在 Visual Studio 中使用 Package Manager Console
运行此命令。
1.这将restore all packages来自解决方案
nuget restore YourSolution.sln
2.如果你想reinstall the packages与之前安装的版本相同
Update-Package -reinstall
关于c# - NuGet出现包丢失问题,如何恢复?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38074578/