Nuget 将不正确的版本显示为最新

Nuget showing incorrect version as latest

我终于成功地创建了一个 nuget 包并用命令行发布了它, 目前我已将其设置为从此属性获取包版本:

[assembly: AssemblyVersion("1.0.0.*")] 

一切正常,除了我最近的两次推送没有显示为最新版本,而是旧版本仍然显示为最新:

所以我想知道,我做错了什么吗? , 1.0.0.5917 应该是默认包但不是

NuGet 显示正确的最新版本,因为 1.0.0.26045 大于 1.0.0.5917。

问题是您在第四位数字(修订号)上使用了星号。根据 MSDN 这个数字是根据以下规则生成的:

The default revision number is the number of seconds since midnight local time (without taking into account time zone adjustments for daylight saving time), divided by 2.

因此它的价值并不总是更高,具体取决于您在一天中的什么时间构建组件。