visual-studio - "Enable NuGet Package Restore"在 VS 2015 中消失了

标签 visual-studio nuget visual-studio-2015 nuget-package-restore

我在获取解决方案以在 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 会恢复丢失的包:

enter image description here

关于visual-studio - "Enable NuGet Package Restore"在 VS 2015 中消失了,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33428381/

相关文章:

visual-studio - 如何在 VS 2022 中调试 Roslyn 源代码生成器?

visual-studio - 即时调试器不会安装在 Visual Studio 2017 中

nuget - 通过 NuGet 的 Azure 存储模拟器?

c++ - Visual Studio 2015 : C++ code analysis error C1253, 无法加载模型文件 'res://mspft140.dll/300'

visual-studio - TF31002 无法从 VS 2012 联机连接到 TFS

c++ - 当我在另一台机器上运行我的应用程序时缺少 DLL 文件?

compiler-errors - 如何解决 “The type or namespace name ' Didstopia'找不到(您是否缺少using指令或程序集引用?)”

带有特定版本 .NET 的 NuGet 包管理器

c# - 找不到与给定名称匹配的资源(值为 @integer/google_play_services_version)”- Visual Studio 2015 Update 3

wpf - 类型 'Window'不支持直接内容