我在获取解决方案以在 Visual Studios 2015 中构建时遇到了严重问题。之前,我只需在 Visual Studios 2013 中单击“启用 NuGet 包还原”,一切都很好。
我看到了这个完全相同的问题 how-to-enable-nugets-package-restore-in-vs-2015
答案是:
delete the packages folder from my solution and also bin and obj folders from every project in the solution and give it a rebuild.
请原谅我的法语,但除此之外都是胡说八道。事实上,您必须手动进入解决方案中的每个项目并四处乱逛,这对我来说也不起作用。也许写这篇文章的人有 3 或 4 个项目,我有 30 多个被引用。
那是在 6 月,有没有人找到一种可行的或更简单的方法来实现在 VS 2015 之前完美运行的功能?
最佳答案
此设置自 NuGet 2.7 起默认启用.使用small Powershell script to migrate来自 old MSBuild to the automatic restore of 2.7解决您的问题。
如果未安装包,您会在构建过程开始时看到此对话框,其中 NuGet 会恢复丢失的包:
关于visual-studio - "Enable NuGet Package Restore"在 VS 2015 中消失了,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33428381/