“还原 NuGet 包"在 Visual Studios 2015 中什么也不做 [英] "Restore NuGet Packages" in Visual Studios 2015 not doing anything

查看:51
本文介绍了“还原 NuGet 包"在 Visual Studios 2015 中什么也不做的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将我的解决方案从 SVN 提取到 Visual Studios 2015.我在代码中的一些使用"引用中遇到错误,所以我在右键单击解决方案时尝试运行还原 NuGet 包"选项解决方案资源管理器".这没有任何作用.我必须手动进入 nuget 管理器并卸载然后重新安装这些项目.为什么是这样?我怎样才能让恢复 NuGet 包"工作?

I pulled my solution from SVN into Visual Studios 2015. I'm getting errors on some of my "using" references within the code, so I am trying to run the "Restore NuGet Packages" option when right clicking the solution in the "Solution Explorer". This does nothing. I have to manually go into nuget manager and uninstall then reinstall the items. Why is this? How can I get "Restore NuGet Packages" to work?

推荐答案

您可能没有从以下部分启用自动包恢复:

You might did not enabled automatic package restore from the following section:

工具 >> 选项 >> Nuget 包管理器 >> 常规设置.

你也可以试试这个:

Update-Package -Reinstall

此代码将强制在所有解决方案的项目中重新安装.

This code will forces re-installation in all solution's projects.

有关详细信息,请查看以下内容:

Look at the following for more info:

nuget-package-restore-not-working

迁移 MSBuild 集成解决方案以使用自动包恢复

希望这会有所帮助:)

这篇关于“还原 NuGet 包"在 Visual Studios 2015 中什么也不做的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆