Package tag revision issue when creating a release from 'latest in repository'

I’m creating packages with tags, e.g. -beta, -rc. I append a revision to these tags, unique within the current version number, e.g. -beta2, -rc5.

If I create a release with the “Latest available in NuGet repository” option, when I have built and pushed a package version of, say, 1.0.0-beta10, the release is picking release 1.0.0-beta9, presumably as 9 > 1 when comparing using an ASCII sort. Is this intended? How can I get around this?

Hi James,

Thanks for getting in touch! Yes the tag is alphanumeric ordering, so to get around this you will have to add leading zeros to your numbers: ie beta009 beta010 and it will order as you require.
We do this ourselves for our own automation and use tools like GitVersion.

Hope this helps!

That makes sense. I’ve padded out my build number and it works now as I would expect. Thanks!