如何从服务器中删除 NuGet 包? [英] How to remove NuGet Package from server?

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

问题描述

我已经向 nuget 添加了新包(我不是在谈论将包的引用添加到项目中).我已将新包添加到服务器,以便其他人可以在他们的项目中使用/使用该包.

I have added new package to nuget(I'm not talking about adding reference of package into project). I have added new packages to server so that others can consume/use that package in their projects.

说包名是 Parser1.0.0.0.nupkg

Say package name was Parser1.0.0.0.nupkg

问题是我忘记添加一个依赖项.现在我想编辑或删除并再次添加正确的.但我不想更改它的版本号.

Problem is I forgot to add one dependency. Now I want to edit or delete and add correct one again. But I don't want to change its version number.

有人知道怎么做吗?

推荐答案

不支持永久删除包,但您可以控制它们的列出方式.(假设您在谈论 nuget.org).

Permanently deleting packages is not supported, but you can control how they are listed. (assuming you're talking about nuget.org).

登录后,在删除包页面上有附加信息.例如https://nuget.org/packages/Parser/1.0.0.0/Delete.

After signing in, in there is additional information on the delete package page. e.g. https://nuget.org/packages/Parser/1.0.0.0/Delete.

从删除包页面引用nuget的解释:

Quoting nuget's explanation from the delete package page :

为什么我不能删除我的包裹?我们的政策是只永久删除真正需要它的 NuGet 包,例如包含密码、恶意/有害代码等的包.此政策与其他包管理器(如 Ruby Gems)采用的政策非常相似.

"Why can’t I delete my package? Our policy is to only permanently delete NuGet packages that really need it, such as packages that contain passwords, malicious/harmful code, etc. This policy is very similar to the policies employed by other package managers such as Ruby Gems.

取消列出包将删除包在 NuGet 中的可用状态.由于三个主要原因,该软件包仍可作为依赖项下载.

Unlisting the package will remove the package from being available in the NuGet. The package is still available for download as a dependency for three main reasons.

其他软件包可能依赖于该软件包.这些包可能不一定在这个库中.确保使用 NuGet 而不提交包(包还原)的人不会被破坏.有助于确保重要的社区拥有的包不会被大量删除."

Other packages may depend on that package. Those packages might not necessarily be in this gallery. Ensures that folks using NuGet without committing packages (package restore) will not be broken. Helps ensure that important community owned packages are not mass deleted."

我建议取消列出以前的包,并在添加依赖项后将版本升级到 1.0.0.1.

I would suggest unlisting the previous package and bumping the version to 1.0.0.1 after adding the dependency.

这篇关于如何从服务器中删除 NuGet 包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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