Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a NuGet package that contains a semantic version parser in .NET? [closed]

I found this blog post and the related Gist. The author does not appear to have created a corresponding NuGet package.

Anyone aware of a NuGet package that already exists?

For reference, here is the specification for semantic versioning.

like image 618
David Peden Avatar asked Jul 15 '14 22:07

David Peden


2 Answers

It turns out that the answer was right under my nose. NuGet.Core itself contains a SemanticVersion class with a TryParse method.

And, you can, in fact, install NuGet.Core via NuGet. :P

Updated (4/30/2018): changed the link per guidance from @JeroenWiertPluimers.

like image 125
David Peden Avatar answered Oct 20 '22 17:10

David Peden


Not that I am aware of.

However, the .NET builtin Version class is perfectly happy to parse a version number compliant with the semantic versioning specification linked to in your question. It will return an object whose value for the Revision number is -1.

like image 21
Maxime Labelle Avatar answered Oct 20 '22 18:10

Maxime Labelle