VS2010, Nuget and oData (and Elmah)

VS2010 package manager:  ‘Nuget’

It’s a VS2010 extension -uninstall the existing one and get the latest via Tools, Extension Manager.

For a given project,  say to install the Nancy package/nuget:

    Tools, Library Package Manager, Package Manager Console:

PM> install-package Nancy.Hosting.Aspnet

Elmah is a useful package for error logging.. add it.

It was referred to by ‘Ha and Ha’ at http://docs.nuget.org/docs/start-here/videos

http://nuget.org is the gallery for all the packages

There is an oData service there, and that is how VS2010 i/f gets at the packages.

Therefore can use LINQPAD to get at the oData stream:

  in VS2010, Tools, Options, Package Manager, Package Sources -hover over the blank checked line… see the URL for the oData:   https://nuget.org/api/v2

Open LINQPad

Add Connection

WCF

enter the URL and proxy auth info

Sample LINQPad query (C# expression):

Packages

.Where(p => (p.Created >= DateTime.Now.AddDays(-5)))

.Take(5)

See http://codebetter.com/johnvpetersen/2012/04/15/using-odata-with-the-nuget-api/

Advertisements

About papayaberry

computer analyst
This entry was posted in Uncategorized and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s