简体   繁体   English

Nuget List CLI 命令显示已删除的包

[英]Nuget List CLI command is showing deleted packages

I am on a Mac using .net core 2.0 and Jetbrains Rider.我在使用 .net core 2.0 和 Jetbrains Rider 的 Mac 上。 I have a network folder where I publish my private nuget packages.我有一个网络文件夹,用于发布我的私有 nuget 包。

nuget push <packagePath> -source <localNugetPath>

I delete a package from the local folder.我从本地文件夹中删除了一个包。

nuget delete <packageID> <packageVersion> [options]

This deleted the nuget package from the network folder but yet it still shows in Rider as an options.这会从网络文件夹中删除 nuget 包,但它仍作为选项显示在 Rider 中。

nuget list [search terms] [options]

The above nuget list command will also show the package.上面的 nuget list 命令也将显示包。 How do I permanently get ride of the package?我如何永久乘坐包裹?

NuGet does not allow for package delete and instead relies on unlisting the packages. NuGet 不允许删除包,而是依赖于取消列出包。 This means:这意味着:

  • This unlisted version is not shown in new searches and hence will not get auto resolved to, in new projects.此未列出的版本不会在新搜索中显示,因此不会在新项目中自动解析为。
  • However, existing projects that have references to this unlisted version continue to work as before.但是,引用此未列出版本的现有项目将继续像以前一样工作。 (And that's one of the reasons for not allowing delete - so that existing projects do not break) (这也是不允许删除的原因之一 - 这样现有项目就不会中断)

The package can shows because it cached.该包可以显示,因为它已缓存。 To clean all cache use command:清除所有缓存使用命令:

nuget locals all -clear

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

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