问题描述
这已经被问过很多次了.解决方案(对我有用)是从 packages.config 文件(这就足够了)和 packages 文件夹中删除 *** 包.
This has been asked many times before. The solution (which works for me) is to delete the *** package(s) from the packages.config file (this is enough), and from the packages folder.
这对我来说是一个糟糕的解决方案,因为每次我想安装一些 nuget 包时都必须重复它.罪魁祸首包各不相同,但每次往往都是相同的包(Newtonsoft.Json/NETStandard.Library 等),直到我删除所有包并尝试重新安装它们(这有时会改变罪魁祸首包).
This is a bad solution for me because it has to be repeated every time I want to install some nuget package. The culprit package varies, but it tends to be the same package(s) every time (Newtonsoft.Json/NETStandard.Library etc...), until I delete all packages and try to reinstall them (this sometimes changes the culprit package).
有解决办法吗?不得不一直做这个手动修复是很伤脑筋的.我认为它指出了我想在我的项目中修改的一些主要潜在问题.
Is there a solution for this? It is nerve-wrecking to have to do this manual fix all the time. And I think it points to some major underlying problem that I would like to amend in my project.
推荐答案
使用以下步骤将 Visual Studio 包管理器更新到最新版本,当前问题将消失.
Update the Visual Studio Package Manager to the latest version using the below steps and the ongoing issue will disappear.
- 在 Visual Studio 中,从工具"菜单中选择扩展和更新"选项.
- 在出现的对话框中,从左侧的树中展开更新"节点.
- 从树中选择Visual Studio Gallery"选项.
- 最后,在对话框右侧的更新列表中查找 Package Manager 更新,然后点击旁边的更新"按钮.
这篇关于检索 *** 的包元数据时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!