如何删除我的解决方案中没有被任何项目引用的 NuGet 包? [英] How do I delete NuGet packages that are not referenced by any project in my solution?

查看:63
本文介绍了如何删除我的解决方案中没有被任何项目引用的 NuGet 包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在升级到 VS2012 和 .NET 4.5 的过程中,不知何故,我设法让 NuGet 感到困惑.有些包出现在包管理器(和包文件夹)中,我无法删除(我相信它们是旧的 ASP.NET NuGet 包,已被新版本的新包名替换.它们每个只有一个 Manage 按钮——但没有卸载按钮.当您查看它们的使用位置时,您会发现没有任何解决方案项目引用它们?它们显示卸载?

Somehow during the upgrade to VS2012 and .NET 4.5, I've managed to get NuGet confused. There are packages that appear in the package manager (and the packages folder) that I cannot delete (I believe they are legacy ASP.NET NuGet packages that have been replaced with new package names with the new version. They each have only a Manage button -- but no uninstall button. And when you look to see where they are used, you can see that they are referenced by none of the solution's projects? They are NOT displaying an Uninstall?

推荐答案

您可以使用带有命令的包管理器控制台:Uninstall-Package PackageId 来删除它,或者只是从 'packages' 中删除包文件夹解决方案文件夹下的文件夹.您可以在此处找到有关包管理器控制台的更多信息:http://docs.nuget.org/docs/reference/package-manager-console-powershell-reference

You can use Package Manager Console with command: Uninstall-Package PackageId to remove it, or just delete package folder from 'packages' folder under solution folder. More information about Package Manager Console you can find here: http://docs.nuget.org/docs/reference/package-manager-console-powershell-reference

这篇关于如何删除我的解决方案中没有被任何项目引用的 NuGet 包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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