Feed changes coming in 2.0

Topics: Ecosystem
Jun 13, 2012 at 8:51 PM

NuGet 2.0 will add the ability to specify a target framework along with package dependencies. To more effectively use this new feature, we're also adding the additional information to the flattened list of dependencies in the feed. Today, the format is:


Now, a target framework moniker will be include:


If you're using the NuGet.Core bits to get feed data, this change shouldn't affect you (aside from the changes in API there). But if you directly access the feed and try to parse that data yourself, you'll probably want to look at the changes.

The changes will be available to test on our Preview site soon (http://preview.nuget.org). When they're there, I'll update this thread.

Jun 15, 2012 at 11:21 AM

How can I tell NuGet client versions? I provide a feed that must work for older NuGet clients as well. 

Do you have a HTTP header's I could check to decide weather I need to include dependencies that way? 

Does NuGet 2.0 support old-style dependencies format as well? For example for packages that were created by older NuGet.

Jun 16, 2012 at 2:56 PM

Is there a spec document on the feed that I can refer to?

Jun 18, 2012 at 3:30 PM

@eugenepetrenko If you're using NuGet.Core to read the OData stream, you don't have to make any client changes to support this. If you look at how we parse dependencies in DataServicePackage, you'll notice we accept one or more tokens but older clients would ignore everything after the 2nd token

Jun 18, 2012 at 3:35 PM

I provide my own NuGet feed, the implementation is on Java, thus I have no chance to reuse NuGet.Core here. 

Is that right, that older NuGet clients will parse new dependencies format without error? Should I remove framework field if I detect older client? 

The second possibility is that my feed return old format of dependencies to new NuGet client. Will it work either? 

Do you change respective section of .nuspec file too? Or will it be auto-updated? How?

Jun 18, 2012 at 4:06 PM

NuGet.Core on the clients, not on the server. Both newer and older clients should be able to parse this format change (again as long as the clients are based off of NuGet.Core). However, only newer clients will not be able to install these packages since we're reving the nuspec schema to support target framework.

Jun 18, 2012 at 4:25 PM

@pranavkm Is this already in a branch/build?

Jun 18, 2012 at 7:45 PM

The current 2.0 client supports it. On the server side, both NuGet.Server and the gallery have been changed to support this. You can look at the server changes by visiting http://preview.nuget.org/api/v2/

Jul 10, 2012 at 5:03 PM

How do I find, install, remove and update NuGet packages using the Manage NuGet Packages dialog box?


real estate investing