Created
October 31, 2016 04:31
-
-
Save scovetta/b0f75b783077815df10498ca28ee25c1 to your computer and use it in GitHub Desktop.
NuGet.Core Parsing Bug
This file contains 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
using System; | |
using System.Linq; | |
using NuGet; | |
namespace NuGetListNamespace | |
{ | |
class NuGetList | |
{ | |
static void Main(string[] args) | |
{ | |
var repo = PackageRepositoryFactory.Default.CreateRepository("https://www.nuget.org/api/v2/"); | |
IQueryable<IPackage> packages = repo.GetPackages().Where(s => s.Id == "E.Deezer"); // bug! | |
foreach (object _package in packages) | |
{ | |
IPackage package = (IPackage)_package; | |
string name = package.Id; | |
string version = package.Version.ToString(); | |
Console.WriteLine("Loaded {0} {1}", name, version); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment