Skip to content

Instantly share code, notes, and snippets.

@scovetta
Created October 31, 2016 04:31
Show Gist options
  • Save scovetta/b0f75b783077815df10498ca28ee25c1 to your computer and use it in GitHub Desktop.
Save scovetta/b0f75b783077815df10498ca28ee25c1 to your computer and use it in GitHub Desktop.
NuGet.Core Parsing Bug
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