本文介绍了如果存在,Nuget创建包覆盖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hi,
I have a nuget package, it is created at post build event in jenkins, I am able to create and push it to nuget.org, but, when I try to push the package with same name(id) and version number, an error is thrown, 'Package with same name and Version number already exists, cannot modify it...'
I even tried to delete the package with delete command, the nuget package is unlisted,
when I try to push the updated package with same name and version, it throws same package exists error
Is there any way, to replace the package without any change in name and version?
If not, can I get the latest version number for my package from nuget and delete(unlist) it, so that I can push the updated package with an incremental version
number, with this 2 step process, I shall make sure, only a version of this package is visible in the nuget package manager UI
Thanks in advance..
--Shabarinadh
What I have tried:
What I have tried:
//Create package
nuget pack MyPackage.nuspec -IncludeReferencedProjects -Prop Configuration=Release -version 1.0.0.0 -outputDirectory ./Packages -Noninteractive -Verbosity Detailed
//delete package by name[id] and version
nuget delete MyPackage.Bin 1.0.0 -Source http://nugetpackages.xx.xx.xxx.com/ -Noninteractive -Verbosity Detailed
//push package command throws error, 'package already exists.. cannot modify...'
nuget push Packages/MyPackage.Bin.1.0.0.0.nupkg -Source http://nugetpackages.xx.xx.xxx.com/ -Noninteractive -Verbosity Detailed
I am able to create and push it to nuget.org, but, when I try to push the package with same name(id) and version number, an error is thrown, 'Package with same name and Version number already exists, cannot modify it...'
I even tried to delete the package with delete command, the nuget package is unlisted,
when I try to push the updated package with same name and version, it throws same package exists error
推荐答案
这篇关于如果存在,Nuget创建包覆盖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!