"Latest Version" does not follow SemVer/Nuget

After installing today’s release (1.6.0.1712) I’ve noticed that the create release screen’s new “latest version” column does not follow the Nuget/SemVer marking of pre-release versions. See: http://docs.nuget.org/docs/reference/versioning#Prerelease_Versions

To demonstrate, we have package X, it has these following versions: 1.0.37-Dev, 1.0.36, 1.0.32-Dev, 1.0.31-Dev. The create new release screen should show the latest release, 1.0.36. It currently lists 1.0.37-Dev.

Thanks Ryan, I’ve pushed a new build here which should fix versioning issues:

Paul

Hey Paul,

I really appreciate you posting a new build so quickly! Thanks. I’m not sure if this is fixed though. I upgraded to 1.6.0.1714 this morning and it is still showing pre-releae packages as latest versions. I’ve attached a screenshot visualizing the problem.

-Ryan

We’re having the same issue here. We’re using Nuget file shares.

Hi Ryan,

We use SemVer to compare the version numbers in both screens, but we also
include prerelease versions. This is consistent with NuGet. For example:

Note that the sorted package versions are:

RavenDB Client 2.0.2265-Unstable
RavenDB Client 2.0.2261
RavenDB Client 2.0.2260
RavenDB Client 2.0.2256-Unstable

Regards,

Paul Stovell
Octopus Deploy
W: octopusdeploy.com | T: @octopusdeploy http://twitter.com/octopusdeploy

Hi,
We’re using 1.6.0.1714 . Latest Version doesn’t seem to be working for us, or I’m not understanding how it’s supposed to work. It’s picking 1.3.4815.21711 over 1.4.4876.23725
1.4.4876.22144
1.3.4864.31673
1.3.4862.17572
etc.

Regards,
Paul

Hi Paul,

Can you send a screenshot including the create release page and the dialog when you click to search for other versions?

Paul

Hi,

I’ve attached a couple of images. The Latest Version it picks for the mobo2go-CompositeService is very old, created on 15th March. There have been dozens of pacakge created since then. The same is happening for the other packages.

Note that the version I type in to create the package isn’t one that will match any of the packages, the numbering system is simpler. That’s why it says the last release was 1.4.0-p3.

Paul

Thanks Paul, I will try to reproduce and provide a fix. What NuGet server
are you using?

Regards,

Paul Stovell
Octopus Deploy
W: octopusdeploy.com | T: @octopusdeploy http://twitter.com/octopusdeploy

It’s our own server on the same IIS instance as Octopus, built using the NuGet.Server.2.1.1 package.

Hi Paul,

I’ve just found a way to fix the “latest version” problem. Our NuGetPackages folder had 963 packages in it. I just copyied that to a backup folder, then deleted all but the most recent 200 .nupkg files. Now the latest version is picked up correctly in all our projects.

So there must be some weird interaction between the latest Octopus and NuGet.Server when there are a lot of files?

Paul

Hi Paul,

Thanks for the update, I believe this should now be fixed in this release:

Paul

Hi Paul,

Yes, mostly fixed, thanks. One oddity is that in the ‘Select package version’ popup all the releases have today’s date, not the date they were created, or the date stamps of the files on the server’s drive. It looks like the time shown is related to the date of the most recently added package which was today.

Paul

Not sure if this can help at all, but I just upgraded to 1.6.1718 and our published dates are correct. We are not using the same NuGet server as you, we are using TeamCity.

Hi.

I guess it would be nice if Octopus provided an option in Create Release page for us to select only stable packages from NuGet feed, just like the NuGet Package Manager does in Visual Studio. That way we could have both stable and prerelease packages in the same feed and still be able to select the latest stable version or the latest prerelease version without having to pick a specific number.

Regards.