简体   繁体   English

“启用NuGet包恢复”在VS 2015中消失了

[英]“Enable NuGet Package Restore” is gone in VS 2015

I am having serious problems getting Solutions to build in Visual Studios 2015. Before I would just click "Enable NuGet Package Restore" in Visual Studios 2013 and everything comes in just fine. 我在使用Visual Studio 2015构建解决方案时遇到了严重问题。之前我只想在Visual Studios 2013中单击“启用NuGet包恢复”,一切都很顺利。

I see this exact same question how-to-enable-nugets-package-restore-in-vs-2015 我看到完全相同的问题如何启用nugets-package-restore-in-vs-2015

the answer was: 答案是:

delete the packages folder from my solution and also bin and obj folders from every project in the solution and give it a rebuild. 从我的解决方案中删除packages文件夹,并从解决方案中的每个项目中删除bin和obj文件夹,并为其重建。

pardon my French, but besides this being bullshit. 请原谅我的法语,但除此之外还要胡说八道。 The fact that you have to manually go into every single project in your solution and mess around , it also is not working for me. 事实上,你必须手动进入解决方案中的每个项目并乱七八糟,这对我来说也不起作用。 Maybe the guy that wrote this had 3 or 4 projects , I have 30+ that are referenced. 也许写这个的人有3个或4个项目,我有30多个被引用。

That was back in June , has anyone found a working or simpler way to achieve this functionality that was working perfectly prior to VS 2015? 那是在6月份,有没有人找到一种工作或更简单的方法来实现在VS 2015之前完美运行的功能?

This setting is on by default since NuGet 2.7 . 默认情况下,此设置为NuGet 2.7 Use a small Powershell script to migrate from the old MSBuild to the automatic restore of 2.7 to fix your issues. 使用小的Powershell脚本旧的MSBuild 迁移 到2.7的自动恢复以修复您的问题。

When a package is not installed you see this dialog at start of the build process where NuGet restores the missing package: 如果未安装软件包,您将在构建过程开始时看到此对话框,其中NuGet将恢复缺少的软件包:

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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