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

查看:956
本文介绍了如何从服务器中删除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天全站免登陆