nuget 规范依赖项,获取最新版本? [英] nuget spec dependencies, get latest version?
本文介绍了nuget 规范依赖项,获取最新版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 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 和最低(基于语义版本)
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-笔记/nuget-2.8
这篇关于nuget 规范依赖项,获取最新版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文