Created
November 9, 2015 04:57
-
-
Save johnsimons/376f1709d31900f1bfed to your computer and use it in GitHub Desktop.
Finding latest production version for a major release
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var repo = PackageRepositoryFactory.Default.CreateRepository("https://www.nuget.org/api/v2/"); | |
| var pkg = repo.FindPackage(packageID, | |
| new VersionSpec | |
| { | |
| MaxVersion = new SemanticVersion(4, 0, 0, 0), | |
| IsMaxInclusive = false, | |
| MinVersion = new SemanticVersion(3, 0, 0, 0), | |
| IsMinInclusive = true | |
| }, false, false); | |
| Console.Out.WriteLine("version={0}", pkg.Version); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks @emgarten