nuget spec依赖项,获取最新版本? [英] nuget spec dependencies, get latest version?
本文介绍了nuget spec依赖项,获取最新版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 nuspec版本控制文档中,我看到
1.0 = 1.0 ≤ x
(,1.0] = x ≤ 1.0
(,1.0) = x < 1.0
[1.0] = x == 1.0
(1.0) = invalid
(1.0,) = 1.0 < x
(1.0,2.0) = 1.0 < x < 2.0
[1.0,2.0] = 1.0 ≤ x ≤ 2.0
empty = latest version.
我有一个看起来像这样的packages.config
I have a packages.config
that looks like this
<packages>
<package id="psake" version="4.2.0.1" />
</packages>
,我想将版本更改为最新".
and I would like to change the version to "latest".
我都尝试过
<packages>
<package id="psake" version="" />
</packages>
和
<packages>
<package id="psake" />
</packages>
,但两者都导致Unable to parse version value '' from 'packages.config'.
我正在使用Nuget.exe 2.8.2
I am using Nuget.exe 2.8.2
推荐答案
从Nuget 2.8开始,您可以将以下属性添加到nuget.config
As of Nuget 2.8 you can add the following attribute to your nuget.config
<configuration>
<config>
<add key="dependencyversion" value="Highest" />
</config>
</configuration>
解析软件包时,将解析该软件包的最新版本.其他属性包括HighestMinor,HighestPatch和lowest(基于语义版本控制)
When resolving your packages, the latest version of that package will be resolved. Other attributes include HighestMinor, HighestPatch and lowest (based on semantic versioning)
来源: http://docs.nuget.org/docs/release- notes/nuget-2.8
这篇关于nuget spec依赖项,获取最新版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文