update-package:无法解析Version参数的输入:最高为有效的语义版本 [英] update-package : Failed to parse the input of Version parameter: highest to a valid Semantic version

查看:269
本文介绍了update-package:无法解析Version参数的输入:最高为有效的语义版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用多个程序包创建了一个Nuget提要. 我的解决方案在不同的项目中使用了各种软件包. 当发布Feed的新版本时,我需要更新项目使用的版本.

I created a Nuget feed with multiple packages. My solution uses various of those packages in different projects. When I publish a new version of the feed I need to update the versions my project uses.

使用VS2017-> Tools-> Manage Packages for Solution真是太好了,所以我想使用Package Manager Console

It is quite fiddly to use VS2017->Tools-> Manage Packages For Solution , so I want to use Package Manager Console

我在程序包管理器控制台" UI中设置程序包源"和默认"项目.

I set the Package source and the Default project in the Package Manager Console UI.

我键入什么命令?

我尝试了

update-package mypackagename -Version highest

但我知道

update-package : Failed to parse the input of Version parameter: highest to a valid Semantic version.

我的版本是预发行版,具有从Azure Devops生成的版本名称,例如

My versions a pre-release with version names generated from Azure Devops like

v2.0.0-Cl-201920226-04750

推荐答案

update-package:无法解析Version参数的输入: 最高到有效的语义版本

update-package : Failed to parse the input of Version parameter: highest to a valid Semantic version

您应该使用命令行:

update-package mypackagename

检查更多信息参数:

版本:用于升级的版本,默认为最新版本.在NuGet 3.0+中,版本值必须为以下值之一 最低,最高,最高未成年人或最高补丁(等同于-Safe).

Version: The version to use for the upgrade, defaulting to the latest version. In NuGet 3.0+, the version value must be one of Lowest, Highest, HighestMinor, or HighestPatch (equivalent to -Safe).

因此,如果我们不指定软件包更新版本,则Package Manager控制台将默认更新最新版本.

So, if we do not specify the package update version, Package Manager Console will update the latest version by default.

注意:

选项LowestHighestHighestMinorHighestPatch用于管理 NuGet CLI 的依赖版本.文档中的描述可能不够清楚.您可以在Package Manager控制台中使用它,例如:

The options Lowest, Highest, HighestMinor, or HighestPatch is used for manage the Dependency Version for NuGet CLI. The description in the documentation may not be clear enough. You could use it in the Package Manager Console like:

update-package mypackagename -DependencyVersion highest

Note2 :

如果软件包是预发行版,则可以在命令行中添加参数-IncludePrerelease.

If your package is pre-release, you could add the parameter -IncludePrerelease in the command line.

希望这会有所帮助.

这篇关于update-package:无法解析Version参数的输入:最高为有效的语义版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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